Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fairseq/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ hydra:
dir: .

defaults:
- _self_
- task: null
- model: null
- criterion: cross_entropy
Expand Down
2 changes: 1 addition & 1 deletion fairseq/optim/fp16_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def __init__(
"Unsupported optimizer: {}".format(optimizer.__class__.__name__)
)

super().__init__(cfg.optimizer)
super().__init__(getattr(cfg, "optimizer", None))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails in some tests on Hydra 1.1 due to an OmegaConf 2.1 change making access to non existing fields behave like it does for objects and dicts (raises an exception).

self.wrapped_optimizer = optimizer

if getattr(cfg.common, "fp16_scale_window", None) is None:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def do_setup(package_data):
"cffi",
"cython",
'dataclasses; python_version<"3.7"',
"hydra-core<1.1",
"hydra-core>=1.0.7,<1.1",
"omegaconf<2.1",
'numpy<1.20.0; python_version<"3.7"',
'numpy; python_version>="3.7"',
Expand Down