I have a config tree such as:
config.yaml
model/
model_a.yaml
model_b.yaml
model_c.yaml
Where config.yaml
contains:
# @package _global_
defaults:
- _self_
- model: model_a.yaml
some_var: 42
I would like to access the name of the model config file used (either the default or overridden) from my python code or from the file itself. Something like:
@hydra.main(...)
def main(config):
model_name = config.model.__filename__
or (from e.g. model_a.yaml
)
dropout: true
dense_layers: 128
model_name: ${__filename__}
Thanks in advance!