I am trying to override the package in default list in a hierarchical configuration structure. As a simplified example:
I have conf/base.yaml
defaults:
- _self_
- env@_here_: env1
a: 1
b: 2
conf/env/env1.yaml
c: 5
d: 6
and conf/env/env2.yaml
c: 7
d: 8
When running my_app.py
import hydra
import omegaconf
@hydra.main(config_path="conf", config_name="base")
def my_app(cfg: omegaconf.DictConf) -> None:
print(omegaconf.OmegaConf.to_yaml(cfg))
my_app()
I want to override env@_here_
from env1
to env2
using the CLI or any other method. I have gone through Hydra documentation a few times, but couldn't find how to do this.