You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python repro.py --optimizer.help torch.optim.OptimizerTraceback (most recent call last): File "/Users/carlosmocholi/git/pytorch-lightning/kk2.py", line 6, in <module> args = parser.parse_args() File "/Users/carlosmocholi/.pyenv/versions/3.9.1/envs/lightning-3.9/lib/python3.9/site-packages/jsonargparse/deprecated.py", line 112, in patched_parse cfg = parse_method(*args, _skip_check=_skip_check, **kwargs) File "/Users/carlosmocholi/.pyenv/versions/3.9.1/envs/lightning-3.9/lib/python3.9/site-packages/jsonargparse/core.py", line 371, in parse_args cfg, unk = self.parse_known_args(args=args) File "/Users/carlosmocholi/.pyenv/versions/3.9.1/envs/lightning-3.9/lib/python3.9/site-packages/jsonargparse/core.py", line 260, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/Users/carlosmocholi/.pyenv/versions/3.9.1/lib/python3.9/argparse.py", line 2060, in _parse_known_args start_index = consume_optional(start_index) File "/Users/carlosmocholi/.pyenv/versions/3.9.1/lib/python3.9/argparse.py", line 2000, in consume_optional take_action(action, args, option_string) File "/Users/carlosmocholi/.pyenv/versions/3.9.1/lib/python3.9/argparse.py", line 1928, in take_action action(self, namespace, argument_values, option_string) File "/Users/carlosmocholi/.pyenv/versions/3.9.1/envs/lightning-3.9/lib/python3.9/site-packages/jsonargparse/actions.py", line 344, in __call__ self.print_help(args, self._baseclass, dest) File "/Users/carlosmocholi/.pyenv/versions/3.9.1/envs/lightning-3.9/lib/python3.9/site-packages/jsonargparse/actions.py", line 375, in print_help super().print_help(call_args, val_class, dest+'.init_args') File "/Users/carlosmocholi/.pyenv/versions/3.9.1/envs/lightning-3.9/lib/python3.9/site-packages/jsonargparse/actions.py", line 348, in print_help tmp.add_class_arguments(val_class, dest) File "/Users/carlosmocholi/.pyenv/versions/3.9.1/envs/lightning-3.9/lib/python3.9/site-packages/jsonargparse/signatures.py", line 74, in add_class_arguments return self._add_signature_arguments(inspect.getmro(theclass), File "/Users/carlosmocholi/.pyenv/versions/3.9.1/envs/lightning-3.9/lib/python3.9/site-packages/jsonargparse/signatures.py", line 248, in _add_signature_arguments self._add_signature_parameter( File "/Users/carlosmocholi/.pyenv/versions/3.9.1/envs/lightning-3.9/lib/python3.9/site-packages/jsonargparse/signatures.py", line 361, in _add_signature_parameter raise ValueError(f'Required parameter without a type for {obj.__name__} parameter {name}.')ValueError: Required parameter without a type for Optimizer parameter params.
I understand what the error message says, but shouldn't the help message still work?
The code snippet is not equivalent to what is in lightning, in particular missing the skip. But from what I see the class help action is not considering the skip. This is a bug.
I understand what the error message says, but shouldn't the help message still work?
Noticed this while checking out Lightning-AI/pytorch-lightning#10725
The text was updated successfully, but these errors were encountered: