Skip to content

Help messages for 'monai-deploy package' and '-l' option is not correct. #70

Open
@gigony

Description

@gigony

Due to ArgumentDefaultsHelpFormatter, its help messages look weird.

@KavinKrishnan
https://github.com/Project-MONAI/monai-app-sdk/blob/e27ffe77e2e2c131320c1c5175127e6b423f70ca/monai/deploy/packager/package_command.py#L21

❯ monai-deploy package --help
usage: monai-deploy package [-h] [-l {DEBUG,INFO,WARN,ERROR,CRITICAL}] --tag
                            TAG [--base BASE] [--working-dir WORKING_DIR]
                            [--input-dir INPUT_DIR] [--output-dir OUTPUT_DIR]
                            [--models-dir MODELS_DIR] [--model MODEL]
                            [--version VERSION] [--timeout TIMEOUT]
                            application

positional arguments:
  application           MONAI application path

optional arguments:
  -h, --help            show this help message and exit
  -l {DEBUG,INFO,WARN,ERROR,CRITICAL}, --log-level {DEBUG,INFO,WARN,ERROR,CRITICAL}
                        Set the logging level (default: INFO) (default: None)
  --tag TAG, -t TAG     MONAI application package tag (default: None)
  --base BASE           Base Application Image (default: None)
  --working-dir WORKING_DIR, -w WORKING_DIR
                        Directory mounted in container for Application
                        (default: None)
  --input-dir INPUT_DIR, -i INPUT_DIR
                        Directory mounted in container for Application Input
                        (default: None)
  --output-dir OUTPUT_DIR, -o OUTPUT_DIR
                        Directory mounted in container for Application Output
                        (default: None)
  --models-dir MODELS_DIR
                        Directory mounted in container for Models Path
                        (default: None)
  --model MODEL, -m MODEL
                        Optional Path to directory containing all application
                        models (default: None)
  --version VERSION     Version of the Application (default: None)
  --timeout TIMEOUT     Timeout (default: None)

@bhatt-piyush
https://github.com/Project-MONAI/monai-app-sdk/blob/43577e61a6cef182d78e70a644f8d592c276cec3/monai/deploy/cli/main.py#L51

❯ monai-deploy run --help
usage: monai-deploy run [-h] [-l {DEBUG,INFO,WARN,ERROR,CRITICAL}] [-q]
                        <map-image[:tag]> <input> <output>

positional arguments:
  <map-image[:tag]>     MAP image name
  <input>               Input data path
  <output>              Output data directory path

optional arguments:
  -h, --help            show this help message and exit
  -l {DEBUG,INFO,WARN,ERROR,CRITICAL}, --log-level {DEBUG,INFO,WARN,ERROR,CRITICAL}
                        Set the logging level (default: INFO) (default: None)
  -q, --quiet           Suppress the STDOUT and print only STDERR from the
                        application (default: False)

We need to update its description to have actual default values without using ArgumentDefaultsHelpFormatter.
Instead, need to use argparse.HelpFormatter.

https://github.com/Project-MONAI/monai-app-sdk/blob/43577e61a6cef182d78e70a644f8d592c276cec3/monai/deploy/cli/exec_command.py#L28

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions