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

Conditional config #735

Closed
pvnieo opened this issue Jun 30, 2020 · 3 comments
Closed

Conditional config #735

pvnieo opened this issue Jun 30, 2020 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@pvnieo
Copy link

pvnieo commented Jun 30, 2020

Hi!

I'm using Hydra 1.0.0rc1.
You can find attached my config layout.

Basically, I'm working on a DL project. I have many models, datasets and data transforms. Each model support only one data transform, which is indicated in it's config file.

Each data transform has parameters that depends on the chosen dataset, and that get interpolated later.

What I want to do, is when I ran my program, I only have to chose the model, then the data transform get chosen automatically, and get passed automatically to the dataset.

But when I ran the config I provided above, using:

python3 test_config.py dataset@trainset=in_memory_faust_remeshed model=geomfmaps_pointnet2

I got AssertionError.

What I'm doing wrong?

conf.zip

@pvnieo pvnieo added the bug Something isn't working label Jun 30, 2020
@pvnieo
Copy link
Author

pvnieo commented Jun 30, 2020

The error is coming from:

pre_transforms: ${model.transforms.pre_transforms}

but when I do:

pre_transforms: ${model.transforms}.pre_transforms

it returns a string!

@omry
Copy link
Collaborator

omry commented Jul 1, 2020

Looks like a bug in OmegaConf.
You are doing something I never tested for here.
I narrowed it down to this minimal example:

transform:
  standard_transforms:
    pre_transforms:
    - transform: NormalizeScale
model:
  transforms: ${transform.standard_transforms}
dataset:
  pre_transforms: ${model.transforms.pre_transforms}

@omry omry added this to the 1.0.0 milestone Jul 1, 2020
@omry
Copy link
Collaborator

omry commented Jul 6, 2020

moved to OmegaConf (omry/omegaconf#283).

@omry omry closed this as completed Jul 6, 2020
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

2 participants