mirror of
https://github.com/vale981/ray
synced 2025-03-08 11:31:40 -05:00
[Projects] Return parameters for a command (#6409)
This commit is contained in:
parent
6272907a57
commit
16be483af7
1 changed files with 4 additions and 1 deletions
|
@ -270,10 +270,11 @@ def get_session_runs(name, command, parsed_args):
|
|||
List of sessions to start, which are dictionaries with keys:
|
||||
"name": Name of the session to start,
|
||||
"command": Command to run after starting the session,
|
||||
"params": Parameters for this run,
|
||||
"num_steps": 4 if a command should be run, 3 if not.
|
||||
"""
|
||||
if not command:
|
||||
return [{"name": name, "command": None, "num_steps": 3}]
|
||||
return [{"name": name, "command": None, "params": {}, "num_steps": 3}]
|
||||
|
||||
# Try to find a wildcard argument (i.e. one that has a list of values)
|
||||
# and give an error if there is more than one (currently unsupported).
|
||||
|
@ -290,6 +291,7 @@ def get_session_runs(name, command, parsed_args):
|
|||
session_run = {
|
||||
"name": name,
|
||||
"command": format_command(command, parsed_args),
|
||||
"params": parsed_args,
|
||||
"num_steps": 4
|
||||
}
|
||||
return [session_run]
|
||||
|
@ -301,6 +303,7 @@ def get_session_runs(name, command, parsed_args):
|
|||
session_run = {
|
||||
"name": "{}-{}-{}".format(name, wildcard_arg, val),
|
||||
"command": format_command(command, parsed_args),
|
||||
"params": parsed_args,
|
||||
"num_steps": 4
|
||||
}
|
||||
session_runs.append(session_run)
|
||||
|
|
Loading…
Add table
Reference in a new issue