Ejemplo n.º 1
0
def stage(op):
    run = init_run(op)
    try:
        _stage_run_proc_env(op, run)
        _resolve_deps(op, run, for_stage=True)
        op_util.set_run_staged(run)
    finally:
        op_util.clear_run_pending(run)
    return run
Ejemplo n.º 2
0
def _init_trial_run(batch_run, trial_flag_vals, run_dir=None):
    run = op_util.init_run(run_dir)
    _link_to_trial(batch_run, run)
    proto_run = batch_run.batch_proto
    util.copytree(proto_run.dir, run.dir)
    run.write_attr("flags", trial_flag_vals)
    run.write_attr("label", _trial_label(proto_run, trial_flag_vals))
    run.write_attr("op", _trial_op_attr(proto_run, trial_flag_vals))
    op_util.set_run_staged(run)
    return run
Ejemplo n.º 3
0
def stage(op, continue_on_deps_error=False):
    run = init_run(op)
    try:
        _stage_run_proc_env(op, run)
        _resolve_deps(op,
                      run,
                      for_stage=True,
                      continue_on_error=continue_on_deps_error)
        op_util.set_run_staged(run)
    finally:
        op_util.clear_run_pending(run)
    return run
Ejemplo n.º 4
0
def init_trial_run(batch_run, trial_flag_vals, run_dir=None):
    run = op_util.init_run(run_dir)
    _link_to_trial(batch_run, run)
    proto_run = batch_run.batch_proto
    assert proto_run, "proto_run not initialized for batch %s (%s)" % (
        batch_run.id,
        batch_run.dir,
    )
    util.copytree(proto_run.dir, run.dir)
    run.write_attr("flags", trial_flag_vals)
    run.write_attr("label", _trial_label(proto_run, trial_flag_vals))
    run.write_attr("op", _trial_op_attr(proto_run, trial_flag_vals))
    op_util.set_run_staged(run)
    return run