Example #1
0
def _push_commit_msg():
    import guild

    return "`guild push` by %s@%s with version %s" % (
        util.user(),
        util.hostname(),
        guild.version(),
    )
Example #2
0
def _delete_commit_msg():
    import guild

    return "`guild runs rm` by %s@%s with version %s" % (
        util.user(),
        util.hostname(),
        guild.version(),
    )
Example #3
0
def _add_run_comment(run, comment, user):
    from . import run_impl

    comments = run.get("comments") or []
    if user:
        user, host = _split_comment_user(user)
        if not host:
            host = util.hostname()
    else:
        user = util.user()
        host = util.hostname()
    comments.append({
        "body": comment,
        "user": user,
        "host": host,
        "time": run_impl.comment_timestamp(),
    })
    return comments
Example #4
0
def _op_extra_attrs(args):
    attrs = {
        "run_params": args.as_kw(),
        "random_seed": _random_seed(args),
        "host": util.hostname(),
        "user": util.user(),
        "platform": util.platform_info(),
    }
    if args.max_trials:
        attrs["max_trials"] = args.max_trials
    return attrs
Example #5
0
def _op_init_run_attrs(args, op):
    attrs = op.run_attrs
    if op._label:
        attrs["label"] = op._label
    if op._batch_trials:
        attrs["trials"] = op._batch_trials
    attrs["flags"] = op._op_flag_vals
    attrs["run_params"] = args.as_kw()
    attrs["random_seed"] = op._random_seed
    if op._max_trials:
        attrs["max_trials"] = op._max_trials
    if op._objective:
        attrs["objective"] = op._objective
    attrs["host"] = util.hostname()
    attrs["user"] = util.user()
    attrs["platform"] = util.platform_info()
    attrs["op"] = _op_config_data(op)
    if _python_op(op):
        attrs["pip_freeze"] = _pip_freeze()
    attrs.update(op._op_cmd_run_attrs)