Closed famura closed 1 year ago
Hi @famura,
The issue here is with the pyyaml
library that OmegaConf uses as a backend. The problem is that the example you gave is not valid yaml.
Either of the following should work:
foo:
bar: [1, "${custom_resolver:thing_to_resolve1}", 2, 3, "${custom_resolver:thing_to_resolve1}"]
foo:
bar:
- 1
- ${custom_resolver:thing_to_resolve1}
- 2
- 3
- ${custom_resolver:thing_to_resolve1}
Thank you @Jasha10 for your super quick answer. So, the problem is once again on the user side 😅 In fact, these are my first experiences with yaml and I am surprised to that writing the list in a different way solves the problem (your solution 2). Anyhow, many thanks! I consider this issues to be solved 👍
Is your feature request related to a problem? Please describe. I guess this is more of a beginner's question that might lead to a feature request.
Describe the solution you'd like I would like to write a config yaml that resolves multiple things within one list for one item, e.g.
You can assume that
already works.
Describe alternatives you've considered None, yet. Maybe writing a custom resolver, but I really don't know if that is necessary.