"git@developer.sourcefind.cn:modelzoo/step1x-edit_pytorch.git" did not exist on "26fa9ddd6e7082c54c6333fd3ae70e5e62d6033d"
Commit 0fe2c879 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

experiments: introduce send_file in executor

(preparation for remote commands)
parent 8c910d9c
......@@ -202,6 +202,8 @@ class Executor(object):
async def await_file(self, path, delay=0.05, verbose=False):
raise NotImplementedError("Please Implement this method")
async def send_file(self, path, verbose=False):
raise NotImplementedError("Please Implement this method")
# runs the list of commands as strings sequentially
async def run_cmdlist(self, label, cmds, verbose=True, host=None):
......@@ -220,4 +222,8 @@ class LocalExecutor(Executor):
if verbose:
print('await_file(%s)' % path)
while not os.path.exists(path):
await asyncio.sleep(delay)
\ No newline at end of file
await asyncio.sleep(delay)
async def send_file(self, path, verbose):
# locally we do not need to do anything
pass
\ No newline at end of file
......@@ -66,6 +66,7 @@ class Experiment(object):
if verbose:
print('preparing config tar:', path)
host.node_config.make_tar(path)
await exec.send_file(path, verbose)
# prepare all simulators in parallel
sims = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment