Comments (4)
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.
That's the answer I needed! Thank you very much! :)
from hydra.
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.
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)
- Hydra CI failures HOT 1
- [Bug] Unexpected behavior of tilde (~) when removing from default list of multiple choices HOT 1
- [Bug] Error in locating target of Instantiation when importing modules HOT 1
- [Feature Request] Conditionally disable the creation of output folders via callback
- [Feature Request] Add more meaningful information on hydra resolving interpolation error HOT 5
- [Bug] Not able to reproduce multi-select example with structured configs HOT 2
- [Feature Request] Concatenating parameter sweeps HOT 2
- Drop python3.7 support
- Pytest fails with unhandled UserWarnings HOT 2
- [Bug] Please allow & in override HOT 3
- Selecting multiple configs from a config group using structured configs HOT 2
- [Bug] mutable default is not allowed in `@dataclass` in python > 3.9. HOT 2
- [Feature Request] Generalize PickleJobInfoCallback to support YAML and/or JSON serialization
- [Bug] Wrong types for config groups with defaults HOT 1
- [Feature Request] How to replace the config_name in bash. HOT 1
- test_initialize_compat_version_base and test_app_with_error_exception_sanitized tests failed
- importlib-resources 6.2+ is breaking hydra HOT 1
- Bug when debugging with vscode
- [Help requested] Dynamic hydra launcher configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hydra.