dstack
dstack copied to clipboard
[Bug]: Cannot see `dstack run --help`
Steps to reproduce
dstack run --help
Expected output
Usage: dstack run [--project NAME] [-h [TYPE]] [-f FILE] [-n RUN_NAME] [-d] [-y] [--max-offers MAX_OFFERS] [--profile NAME] [--max-price PRICE] [--max-duration DURATION] [-b NAME] [-r NAME]
[--pool POOL_NAME | --reuse | --dont-destroy | --idle-duration IDLE_DURATION | --instance NAME] [--spot | --on-demand | --spot-auto | --spot-policy POLICY]
[--retry | --no-retry | --retry-limit DURATION] [-e KEY=VALUE] [--gpu SPEC] [--disk RANGE]
working_dir
Positional Arguments:
working_dir
Options:
--project NAME The name of the project. Defaults to $DSTACK_PROJECT
-h, --help [TYPE] Show this help message and exit. TYPE is one of task, dev-environment, service
-f, --file FILE The path to the run configuration file. Defaults to WORKING_DIR/.dstack.yml
... etc ...
Actual output
Usage: dstack run [--project NAME] [-h [TYPE]] [-f FILE] [-n RUN_NAME] [-d] [-y] [--max-offers MAX_OFFERS] [--profile NAME] [--max-price PRICE] [--max-duration DURATION] [-b NAME] [-r NAME]
[--pool POOL_NAME | --reuse | --dont-destroy | --idle-duration IDLE_DURATION | --instance NAME] [--spot | --on-demand | --spot-auto | --spot-policy POLICY]
[--retry | --no-retry | --retry-limit DURATION]
working_dir
dstack run: error: the following arguments are required: working_dir
Note: The workaround is to use dstack run . --help
. This workaround is mentioned in the docs, so the docs will have to be updated once this is fixed
This bug exists because of the implementation of different help messages for different run configurations: --help task
, --help dev-environment
, and --help service
. But according to @peterschmidt85, the --help [TYPE]
syntax is not very important, so it is possible to discard it in case this helps fix the bug
@jvstme I suggest that we display all supported arguments regardless of the configuration and allow for invoking 'dstack --help' without parameters. Feel free to take on this task once you finish your current one!
This issue is stale because it has been open for 30 days with no activity.