Skip to content

Why is it necessary to specify subcommands in the yaml config for the model in CLI mode? #17209

Discussion options

You must be logged in to vote

There are many possibilities to provide settings to a CLI, and having one yaml where you can specify all subcommand is just one of them. With run=True you can give to the CLI a single config that does not require a subcommand as:

python main.py fit --config=test_cfg.yaml

Note that in the command, the config is given after fit. The subcommand is already known, so the config is expected to not specify it. If the command is

python main.py --config=test_cfg.yaml fit

i.e. the config is given before fit, then the config must specify the subcommand. Similarly it is possible to specify default_config_files for each subcommand (see lightning_cli_advanced_2.html#set-default-config-files), in which …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@nicoloesch
Comment options

@mauvilsa
Comment options

@nicoloesch
Comment options

Answer selected by nicoloesch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment