예제 #1
0
def _try_guildfile_compare(run):
    try:
        gf = guildfile.from_run(run)
    except (guildfile.NoModels, guildfile.GuildfileMissing, TypeError):
        return None
    else:
        return _try_guildfile_op_compare(
            gf, run.opref.model_name, run.opref.op_name)
예제 #2
0
def _try_guildfile_compare(run, _index):
    """Returns the current compare for run op if available."""
    try:
        gf = guildfile.from_run(run)
    except (guildfile.NoModels, TypeError):
        return None
    else:
        return _try_guildfile_op_compare(gf, run.opref.model_name,
                                         run.opref.op_name)
예제 #3
0
파일: publish.py 프로젝트: yuanbw/guildai
def _run_opdef(run):
    try:
        gf = guildfile.from_run(run)
    except (guildfile.NoModels, TypeError):
        return None
    else:
        assert run.opref, run.path
        try:
            m = gf.models[run.opref.model_name]
        except KeyError:
            return None
        else:
            return m.get_operation(run.opref.op_name)
예제 #4
0
def run_guildfile(run):
    try:
        return guildfile.from_run(run)
    except (guildfile.NoModels, guildfile.GuildfileMissing, TypeError):
        return None