GithubHelp home page GithubHelp logo

Comments (4)

odelalleau avatar odelalleau commented on June 18, 2024 1

Yes, interpolations work. But if you print cfg.data_conf.cols you are printing a ListConfig object, which doesn't resolve interpolations by default. If you want to see the resolved fields, you can use for instance print(list(cfg.data_conf.cols)) or (more generally) use OmegaConf.to_container(cfg.data_conf.cols, resolve=True).

from hydra.

MouradInan-betclic avatar MouradInan-betclic commented on June 18, 2024 1

That's the answer I needed! Thank you very much! :)

from hydra.

odelalleau avatar odelalleau commented on June 18, 2024

This is not a bug. This is because when using ${.rate_at} you are using a relative interpolation at the same level as the current node, which means you are trying to interpolate to another element of the list (which won't work because the list has no element named rate_at). Instead you need to go one level higher in the config hierarchy, by using ${..rate_at}.

from hydra.

MouradInan-betclic avatar MouradInan-betclic commented on June 18, 2024

Hello, I also tried this one you mentioned but, I don't think the problem is there. The problem is when you are in a list elements, I'm not sure that interpolation works for this specific use case.
By the way with your solution, I have:
['A', 'B', 'C_${..rate_at}', 'D_${..rate_at}']

p.s:
I just realised that the print in python code should be
print(cfg.data_conf.cols)
sorry for that :)

from hydra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.