Skip to content

Commit

Permalink
fix architecture params (#1382)
Browse files Browse the repository at this point in the history
Summary:
fixes architectures not getting applied to migrated models

Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1382

Reviewed By: myleott

Differential Revision: D24603110

Pulled By: alexeib

fbshipit-source-id: 18f44d3736853282466feed5e8896db95338b097
  • Loading branch information
alexeib authored and myleott committed Jan 5, 2021
1 parent 8a0b56e commit 33b87bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fairseq/models/fairseq_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def add_args(cls, parser):
"""Add model-specific arguments to the parser."""
dc = getattr(cls, "__dataclass", None)
if dc is not None:
gen_parser_from_dataclass(parser, dc())
# do not set defaults so that settings defaults from various architectures still works
gen_parser_from_dataclass(parser, dc(), delete_default=True)

@classmethod
def build_model(cls, args, task):
Expand Down

0 comments on commit 33b87bd

Please sign in to comment.