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: fairinternal/fairseq-py#1382

Reviewed By: myleott

Differential Revision: D24603110

Pulled By: alexeib

fbshipit-source-id: 18f44d3736853282466feed5e8896db95338b097
  • Loading branch information
alexeib authored and facebook-github-bot committed Oct 29, 2020
1 parent 9c66ff5 commit b7d8b9d
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 @@ -40,7 +40,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 b7d8b9d

Please # to comment.