in torchx/cli/cmd_run.py [0:0]
def add_arguments(self, subparser: argparse.ArgumentParser) -> None:
scheduler_names = get_scheduler_factories().keys()
self._subparser = subparser
subparser.add_argument(
"-s",
"--scheduler",
type=str,
help=f"Name of the scheduler to use. One of: [{','.join(scheduler_names)}]",
default=get_default_scheduler_name(),
)
subparser.add_argument(
"-cfg",
"--scheduler_args",
type=str,
help="Arguments to pass to the scheduler (Ex:`cluster=foo,user=bar`)."
" For a list of scheduler run options run: `torchx runopts`"
"",
)
subparser.add_argument(
"--dryrun",
action="store_true",
default=False,
help="Does not actually submit the app,"
" just prints the scheduler request",
)
subparser.add_argument(
"--wait",
action="store_true",
default=False,
help="Wait for the app to finish before exiting.",
)
subparser.add_argument(
"--log",
action="store_true",
default=False,
help="Stream logs while waiting for app to finish.",
)
subparser.add_argument(
"component_name_and_args",
nargs=argparse.REMAINDER,
)