-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedOpen to be worked onOpen to be worked on
Description
🐛 Bug
Running python pl_examples\domain_templates\semantic_segmentation.py leads to argument options conflicting error.
The issue is the same as the one with #5382
This error seems to be because add_help=True in argparse.ArgumentParser in both the parent_parser and in the parser for adding model specific args. Setting it to False in only one of either parser seems to fix this and help options work too
To Reproduce
https://colab.research.google.com/drive/1KgByl810j5ux7vmHoGfOz5MfYG3dIwqd?usp=sharing
Error:
Traceback (most recent call last):
File "pytorch-lightning/pl_examples/domain_templates/semantic_segmentation.py", line 288, in <module>
parser = SegModel.add_model_specific_args(parser)
File "pytorch-lightning/pl_examples/domain_templates/semantic_segmentation.py", line 247, in add_model_specific_args
parser = ArgumentParser(parents=[parent_parser])
File "/usr/lib/python3.6/argparse.py", line 1666, in __init__
self._add_container_actions(parent)
File "/usr/lib/python3.6/argparse.py", line 1435, in _add_container_actions
group_map.get(action, self)._add_action(action)
File "/usr/lib/python3.6/argparse.py", line 1565, in _add_action
action = super(_ArgumentGroup, self)._add_action(action)
File "/usr/lib/python3.6/argparse.py", line 1375, in _add_action
self._check_conflict(action)
File "/usr/lib/python3.6/argparse.py", line 1514, in _check_conflict
conflict_handler(action, confl_optionals)
File "/usr/lib/python3.6/argparse.py", line 1523, in _handle_conflict_error
raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument -h/--help: conflicting option strings: -h, --help
Environment
Google Colab
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedOpen to be worked onOpen to be worked on