I modify the config.yaml form the tutorials in the hydra repository as follows:
defaults:
- db: mysql
- ui: full
- schema: school
test_key: ${db.user}
However, the test_key is still ${db.user} in the output without being replaced by the actual value omry.
I type the command python my_app.py in the folder.
OmegaConf interpolations are resolved when you access the field. To see the resolved value, add resolve=True to the call
OmegaConf.to_yaml():Or just access the field (
cfg.test_key).As a side note, I recommend that you go over the documentation of OmegaConf.