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
The reason is that both LightningDataModule and LightningModule use the same argparse argument.
The error can be resolved by defining the arguments that are used only in one of the modules in each and defining the arguments that are used in both in the main function.
I hope this helps you.
when i try to train stage1, and got this error, is there anyone who konw how fix it? plz. look for your reply.
ArgumentParser(prog='main.py', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=False)
Traceback (most recent call last):
File "main.py", line 1450, in
main(get_args())
File "main.py", line 1390, in get_args
parser = BirdClef2021DataModule.add_argparse_args(parser)
File "D:\Anaconda\envs\birdclef\lib\site-packages\pytorch_lightning\core\datamodule.py", line 75, in add_argparse_args
return add_argparse_args(cls, parent_parser, **kwargs)
File "D:\Anaconda\envs\birdclef\lib\site-packages\pytorch_lightning\utilities\argparse.py", line 268, in add_argparse_args
parser.add_argument(
File "D:\Anaconda\envs\birdclef\lib\argparse.py", line 1386, in add_argument
return self._add_action(action)
File "D:\Anaconda\envs\birdclef\lib\argparse.py", line 1590, in _add_action
action = super(_ArgumentGroup, self)._add_action(action)
File "D:\Anaconda\envs\birdclef\lib\argparse.py", line 1400, in _add_action
self._check_conflict(action)
File "D:\Anaconda\envs\birdclef\lib\argparse.py", line 1539, in _check_conflict
conflict_handler(action, confl_optionals)
File "D:\Anaconda\envs\birdclef\lib\argparse.py", line 1548, in _handle_conflict_error
raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --batch_size: conflicting option string: --batch_size
The text was updated successfully, but these errors were encountered: