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)
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)
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)
def run_guildfile(run): try: return guildfile.from_run(run) except (guildfile.NoModels, guildfile.GuildfileMissing, TypeError): return None