Beispiel #1
0
def _batch_proto(run):
    proto_dir = run.guild_path("proto")
    if os.path.exists(proto_dir):
        return runlib.from_dir(proto_dir)
    return None
Beispiel #2
0
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)
Beispiel #3
0
 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
Beispiel #4
0
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)