Skip to content

run=False in CLI prevents some config keys from being accepted #12302

@cifkao

Description

@cifkao

🐛 Bug

Instantiating LightningCLI with run=False prevents some config keys (namely seed_everything and ckpt_path) from being accepted. This seems to be because these config keys are defined by a subcommand parser, and these are not initialized when run=False is passed.

This makes it impossible to load config files created by Lightning during training since they contain the seed_everything ckpt_path key.

To Reproduce

Boring model

error: 'Configuration check failed :: No action for destination key "ckpt_path" to check its value.'

Expected behavior

Should run without error.

Environment

  • CUDA:
    • GPU:
      • Tesla K80
    • available: True
    • version: 11.1
  • Packages:
    • numpy: 1.21.5
    • pyTorch_debug: False
    • pyTorch_version: 1.10.0+cu111
    • pytorch-lightning: 1.5.10
    • tqdm: 4.63.0
  • System:
    • OS: Linux
    • architecture:
      • 64bit
    • processor: x86_64
    • python: 3.7.12
    • version: # 1 SMP Tue Dec 7 09:58:10 PST 2021

cc @carmocca @mauvilsa

Metadata

Metadata

Assignees

No one assigned

    Labels

    lightningclipl.cli.LightningCLIwon't fixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions