Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The version of jsonargparse #2

Open
ydyhello opened this issue Jun 19, 2023 · 3 comments
Open

The version of jsonargparse #2

ydyhello opened this issue Jun 19, 2023 · 3 comments

Comments

@ydyhello
Copy link

Hello, I have the following problem while running the "python main.py fit --config config.yml --model.arch_layer 3 --model.noise_T 100 ..." command. Is this something to do with the jsonargparse version?

(M2021-YDY-chirodiff) M2021-YDY@hndx-R8424-G12:~/chirodiff-master$ python main.py fit --config config.yml --model.arch_layer 3 --model.noise_T 100 ...
Traceback (most recent call last):
  File "main.py", line 692, in <module>
    cli = LightningCLI(SketchDiffusion, GenericDM, run=True,
  File "/home/hndx/anaconda3/envs/M2021-YDY-chirodiff/lib/python3.8/site-packages/pytorch_lightning/utilities/cli.py", line 515, in __init__
    self.setup_parser(run, main_kwargs, subparser_kwargs)
  File "/home/hndx/anaconda3/envs/M2021-YDY-chirodiff/lib/python3.8/site-packages/pytorch_lightning/utilities/cli.py", line 551, in setup_parser
    self._add_subcommands(self.parser, **subparser_kwargs)
  File "/home/hndx/anaconda3/envs/M2021-YDY-chirodiff/lib/python3.8/site-packages/pytorch_lightning/utilities/cli.py", line 624, in _add_subcommands
    subcommand_parser = self._prepare_subcommand_parser(trainer_class, subcommand, **kwargs.get(subcommand, {}))
  File "/home/hndx/anaconda3/envs/M2021-YDY-chirodiff/lib/python3.8/site-packages/pytorch_lightning/utilities/cli.py", line 632, in _prepare_subcommand_parser
    self._add_arguments(parser)
  File "/home/hndx/anaconda3/envs/M2021-YDY-chirodiff/lib/python3.8/site-packages/pytorch_lightning/utilities/cli.py", line 594, in _add_arguments
    parser.add_lr_scheduler_args(LR_SCHEDULER_REGISTRY.classes)
  File "/home/hndx/anaconda3/envs/M2021-YDY-chirodiff/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 "/home/hndx/anaconda3/envs/M2021-YDY-chirodiff/lib/python3.8/site-packages/jsonargparse/signatures.py", line 477, in add_subclass_arguments
    doc_group = get_doc_short_description(baseclass[0], logger=self.logger)
IndexError: tuple index out of range

My version of jsonargparse is as followsjsonargparse 4.21.2

My Python version is 3.8.17 and pytorch-lightning version is 1.5.9

@dasayan05
Copy link
Owner

Strange! It doesn't look anything on my code. Probably library version issue. BTW my env says it's jsonargparse == 4.12.0 -- quite older. Maybe give that a try.

@ydyhello
Copy link
Author

Hello, I am currently checking the configuration file config.yml. In the open source code, except for the following lines, are there any other changes?

...
entity: # TODO: fill these two ..
project: # .. entires yourself.
...
root_dir: # TODO: path to the _.npz file
...

@cagatayyildiz
Copy link

@ydyhello did you manage to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants