Adding an @package directive
Hydra 1.0 introduces the concept of a config
package is the common parent
path of all nodes in the config file.
- In Hydra 0.11, there was an implicit default of
- In Hydra 1.1 the default will be
_group_(the name of the config group).
- Hydra 1.0 maintains the implicit default of
_global_and issues a warning for any config group file without a
By adding an explicit
@package to these configs now, you guarantee that your configs
will not break when you upgrade to Hydra 1.1.
@package directive is described in details here.
Recommended (~10 seconds per config file):
Case 1: For config files where the common parent path matches the config group name:
# @package _group_to the top of every config group file
- Remove the common parent path config file like in the example below.
Case 2: For files without a common parent path:
# @package _global_.
Alternative (not recommended):
- If you do not want to restructure the config at this time use
Case 2for all your config files.
# @package _group_
The interpretations of the before and after files are identical.
# @package _global_