HyperPyYAML
HyperPyYAML copied to clipboard
Cannot include documents with object `!ref`s
Right now, the !include
tag first resolves references in the included document (turning objects into anchors like *id001
) the names of which collide with any references in the original document.
Same here. I wish to !include a yaml file based on the dataset name but it is not working.
dataset_name: TIMIT dataset_yaml: !ref ../datasets/<dataset_name>/dataset.yaml dataset: !include:!ref <dataset_yaml>
@pplantinga, is there a fix for that?
The issue @weiwei-ww has brought up is actually a separate issue. In this case, what is desired is the dereference to happen before the include. In fact, the !include
was designed to take place before the dereference so that items in the included file can also be referenced.
The issue @weiwei-ww has brought up is actually a separate issue. In this case, what is desired is the dereference to happen before the include. In fact, the
!include
was designed to take place before the dereference so that items in the included file can also be referenced.
Yes, that is exactly what I was proposing. I wish to have a single code entrance (e.g. train.py), with model names (e.g. CTC) given by command line arguments. Then the corresponding yaml file for that model (e.g. models/CTC/hparams/train.yaml) will be loaded automatically.