Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
add args_no_hyphens to sweep command
Browse files Browse the repository at this point in the history
  • Loading branch information
raubitsj committed Sep 17, 2020
1 parent a9e4ad3 commit 3105b58
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions wandb/wandb_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,21 @@ def _command_run(self, command):

env = dict(os.environ)

flags = ["--{}={}".format(name, config['value'])
for name, config in command['args'].items()]
flags_no_hyphens = ["{}={}".format(name, config['value'])
for name, config in command['args'].items()]
flags = ["--" + flag for flag in flags_no_hyphens]

if self._function:
proc = AgentProcess(function=self._function, env=env,
run_id=run_id, in_jupyter=self._in_jupyter)
else:
sweep_vars = dict(interpreter=["python"], program=[command['program']], args=flags, env=["/usr/bin/env"])
sweep_vars = dict(
interpreter=["python"],
program=[command['program']],
args=flags,
args_no_hyphens=flags_no_hyphens,
env=["/usr/bin/env"],
)
if platform.system() == "Windows":
del sweep_vars["env"]
command_list = []
Expand Down

0 comments on commit 3105b58

Please sign in to comment.