Closed QuentinDuval closed 3 years ago
This pull request was exported from Phabricator. Differential Revision: D29778452
This pull request was exported from Phabricator. Differential Revision: D29778452
This pull request was exported from Phabricator. Differential Revision: D29778452
This pull request has been merged in facebookresearch/vissl@974576b93a77d0a9357e8b89e76842911c137eae.
Summary: Updates necessary to update to Hydra 1.1.
Composition order is changing
One of the changes in Hydra 1.1 is that the default composition order is changing. This is documented in: https://hydra.cc/docs/upgrades/1.0_to_1.1/default_composition_order.
In Hydra 1.1, a config is overriding values introduced by the defaults list while in Hydra 1.0 - the defaults list was overriding the values in the config.
The solution is to add
_self_
as the first item in the defaults list.Hydra 1.0.7: As of Hydra 1.0.7, Hydra 1.0 ignores
_self_
in the defaults list. Adding it there does not change the behaviour of Hydra 1.0. This is the minimum version of Hydra supported by VISSL from this commit on. An assert has been added to ask users to upgrade.Hydra 1.1: In Hydra 1.1,
_self_
determines the composition order of the content of a config relative to the items from its defaults list. Adding_self_
as the first item ensures that the defaults list will override the config and not the other way around.Compose is not experimental anymore
Calls to
hydra.experimental.compose
will raise a warning starting from Hydra 1.1. The code has been adapted to make sure the correct version of compose is used in Hydra 1.1.Differential Revision: D29778452