[Bug] ValueError: Expected 'baseclass' to be a subclass type or a tuple of subclass types: () when running 'python run.py fit --config src/configs/retail.yaml' #20437
Unanswered
enermyfree
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment
-
Please provide full minimal reproduction code. Also, why are you using such an old version of lightning? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When attempting to run the command python run.py fit --config src/configs/retail.yaml, the following error occurred:
Traceback (most recent call last):
File "run.py", line 12, in
cli_main()
File "run.py", line 9, in cli_main
cli = LightningCLI(RecModel, RecDataModule, save_config_overwrite=True)
File "/output/py38/lib/python3.8/site-packages/pytorch_lightning/utilities/cli.py", line 488, in init
self.setup_parser(run, main_kwargs, subparser_kwargs)
File "/output/py38/lib/python3.8/site-packages/pytorch_lightning/utilities/cli.py", line 524, in setup_parser
self._add_subcommands(self.parser, **subparser_kwargs)
File "/output/py38/lib/python3.8/site-packages/pytorch_lightning/utilities/cli.py", line 597, in _add_subcommands
subcommand_parser = self._prepare_subcommand_parser(trainer_class, subcommand, **kwargs.get(subcommand, {}))
File "/output/py38/lib/python3.8/site-packages/pytorch_lightning/utilities/cli.py", line 605, in _prepare_subcommand_parser
self._add_arguments(parser)
File "/output/py38/lib/python3.8/site-packages/pytorch_lightning/utilities/cli.py", line 567, in _add_arguments
parser.add_lr_scheduler_args(LR_SCHEDULER_REGISTRY.classes)
File "/output/py38/lib/python3.8/site-packages/pytorch_lightning/utilities/cli.py", line 213, in add_lr_scheduler_args
self.add_subclass_arguments(lr_scheduler_class, nested_key, **kwargs)
File "/output/py38/lib/python3.8/site-packages/jsonargparse/_signatures.py", line 526, in add_subclass_arguments
raise ValueError(f"Expected 'baseclass' to be a subclass type or a tuple of subclass types: {baseclass}")
ValueError: Expected 'baseclass' to be a subclass type or a tuple of subclass types: ()
Environment Information
Operating System: [Specify the name and version of the operating system, e.g. Ubuntu 20.04]
Python Version: 3.8
pytorch_lightning Version: 1.5.3
jsonargparse Version: 4.34.0
Beta Was this translation helpful? Give feedback.
All reactions