def _batch_proto(run): proto_dir = run.guild_path("proto") if os.path.exists(proto_dir): return runlib.from_dir(proto_dir) return None
def _apply_batch_proto(run, data): proto_dir = run.guild_path("proto") if os.path.exists(proto_dir): proto = runlib.from_dir(proto_dir) data["batch_proto"] = _listed_run_json_data(proto)
def run_capture(self, *args, **kw): """Runs an operation returning a tuple of run and output.""" run_dir = self._run_dir_apply(kw) out = self._run(*args, **kw) return runlib.from_dir(run_dir), out
def _run_for_job_pidfile(pid_arg): m = re.search(r"(.+)/\.guild/JOB$", pid_arg) if not m: return None run_dir = m.group(1) return runlib.from_dir(run_dir)