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

argparse.ArgumentError: argument --gradient_checkpointing: conflicting option string: --gradient_checkpointing #4

Closed
freesunshine0316 opened this issue Oct 17, 2021 · 3 comments · Fixed by #7

Comments

@freesunshine0316
Copy link

Hi,

I encounter the following error when simply executing make eval

argparse.ArgumentError: argument --gradient_checkpointing: conflicting option string: --gradient_checkpointing
@tscholak
Copy link
Collaborator

Hi @freesunshine0316!
Thank you for raising this issue. The cause seems to be this upstream PR, huggingface/transformers#13657. I'll push a fix now.
Best, Torsten

tscholak added a commit that referenced this issue Oct 18, 2021
@tscholak tscholak mentioned this issue Oct 18, 2021
@freesunshine0316
Copy link
Author

Hi @tscholak

Seems that it has not been fixed. Do I have to re-download the docker images?
I tried to modify the code inside the repo, but that's not reflected in later program execution.

Traceback (most recent call last):
  File "seq2seq/run_seq2seq.py", line 270, in <module>
    main()
  File "seq2seq/run_seq2seq.py", line 38, in main
    (PicardArguments, ModelArguments, DataArguments, DataTrainingArguments, Seq2SeqTrainingArguments)
  File "/opt/conda/lib/python3.7/site-packages/transformers/hf_argparser.py", line 70, in __init__
    self._add_dataclass_arguments(dtype)
  File "/opt/conda/lib/python3.7/site-packages/transformers/hf_argparser.py", line 146, in _add_dataclass_arguments
    parser.add_argument(field_name, **kwargs)
  File "/opt/conda/lib/python3.7/argparse.py", line 1373, in add_argument
    return self._add_action(action)
  File "/opt/conda/lib/python3.7/argparse.py", line 1736, in _add_action
    self._optionals._add_action(action)
  File "/opt/conda/lib/python3.7/argparse.py", line 1577, in _add_action
    action = super(_ArgumentGroup, self)._add_action(action)
  File "/opt/conda/lib/python3.7/argparse.py", line 1387, in _add_action
    self._check_conflict(action)
  File "/opt/conda/lib/python3.7/argparse.py", line 1526, in _check_conflict
    conflict_handler(action, confl_optionals)
  File "/opt/conda/lib/python3.7/argparse.py", line 1535, in _handle_conflict_error
    raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --gradient_checkpointing: conflicting option string: --gradient_checkpointing
make: *** [eval] Error 1

@tscholak
Copy link
Collaborator

Hi @freesunshine0316!
Yes, when you modify code locally, these changes remain local and are not reflected in the builds or instances of the docker images. The reason is that the make targets check the commit hash of the current branch and then download and run the image tagged with that hash from the docker hub.
When you pull from the main branch, you should get the changes I made that fix the issue. When you then invoke make again, it will download the new images. Since the changes were minor, that download shouldn't take long.
Best,
Torsten

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

Successfully merging a pull request may close this issue.

2 participants