Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot include documents with object !refs #2

Open
pplantinga opened this issue Mar 23, 2021 · 4 comments
Open

Cannot include documents with object !refs #2

pplantinga opened this issue Mar 23, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@pplantinga
Copy link
Collaborator

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.

@pplantinga pplantinga added the bug Something isn't working label Mar 23, 2021
@pplantinga pplantinga self-assigned this Mar 23, 2021
@weiwei-ww
Copy link
Contributor

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>

@mravanelli
Copy link

@pplantinga, is there a fix for that?

@pplantinga
Copy link
Collaborator Author

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.

@weiwei-ww
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants