Skip to content

Cannot include documents with object !refs #2

Open

Description

@pplantinga

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.

Activity

  1. self-assigned this
    on Mar 23, 2021
  2. weiwei-ww commented on Nov 9, 2021

    @weiwei-ww
    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>

  3. mravanelli commented on Nov 9, 2021

    @mravanelli

    @pplantinga, is there a fix for that?

  4. pplantinga commented on Nov 9, 2021

    @pplantinga
    CollaboratorAuthor

    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.

  5. weiwei-ww commented on Nov 9, 2021

    @weiwei-ww
    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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions