예제 #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
예제 #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)
예제 #3
0
파일: _test.py 프로젝트: yuanbw/guildai
 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
예제 #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)