Skip to content

Commit

Permalink
Small Hydra fix (facebookresearch#1543)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: fairinternal/fairseq-py#1543

Test Plan: Imported from OSS

Reviewed By: girifb

Differential Revision: D25836852

Pulled By: myleott

fbshipit-source-id: 7fda711d21f2d1b7bac26792233997e8dea2f835
  • Loading branch information
Myle Ott authored and facebook-github-bot committed Jan 28, 2021
1 parent 6225dcc commit 96da4d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fairseq/dataclass/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def get_kwargs_from_dc(
continue
else:
del kwargs["default"]
if delete_default:
if delete_default and "default" in kwargs:
del kwargs["default"]
try:
parser.add_argument(*field_args, **kwargs)
Expand Down

0 comments on commit 96da4d3

Please sign in to comment.