Open YodaEmbedding opened 2 months ago
Input:
# dataset/imagenet.yaml path: "/datasets/imagenet" type: "ImageNetDataset"
# example.yaml defaults: - dataset/imagenet - _self_ dataset: type: "Overriden"
# main.py import hydra import yaml from omegaconf import DictConfig, OmegaConf @hydra.main(version_base=None, config_path="conf") def main(conf: DictConfig): print(yaml.dump(OmegaConf.to_container(conf, resolve=True))) if __name__ == "__main__": main()
[Case 1]
python main.py --config-path=conf --config-name=example '~dataset'
Output:
dataset: type: Overridden
It seems that _self_ is not processed in the same way as the defaults list.
_self_
[Case 2]
python simple.py --config-path=conf --config-name=example '~dataset' dataset=imagenet
See above.
[Case 1] Output:
dataset: {}
[Case 2] Output:
dataset: path: "/datasets/imagenet" type: "ImageNetDataset"
🐛 Bug
Description
Input:
[Case 1]
Output:
It seems that
_self_
is not processed in the same way as the defaults list.[Case 2]
Output:
Checklist
To reproduce
See above.
Expected Behavior
[Case 1] Output:
[Case 2] Output:
System information
Additional context