예제 #1
0
def _trial_label(proto_run, trial_flag_vals):
    user_flag_vals = {
        name: val
        for name, val in trial_flag_vals.items() if val is not None
    }
    label_template = (proto_run.get("op") or {}).get("label_template")
    return op_util.run_label(label_template, user_flag_vals, trial_flag_vals)
예제 #2
0
def _trial_label(proto_run, trial_flag_vals):
    label_template = (proto_run.get("op") or {}).get("label_template")
    return op_util.run_label(label_template, trial_flag_vals)
예제 #3
0
파일: ipy.py 프로젝트: hkennyv/guildai
def _run_label(flag_vals, opts):
    return op_util.run_label(_label_template(opts), flag_vals)
예제 #4
0
def format_run_label(template, run):
    fmt_params = run.get("flags") or {}
    fmt_params["label"] = _run_label(run)
    return op_util.run_label(template, fmt_params).strip()
예제 #5
0
def _run_label(label_template, flags):
    if not label_template:
        return ""
    return op_util.run_label(label_template, flags)
예제 #6
0
def _op_init_label(op):
    op._label = op_util.run_label(op._label_template, op._user_flag_vals,
                                  op._op_flag_vals)