Value interpolation does not seem to work in list e.g.:
chckpnt_dirnames:
- ${base_dir}/${model.name}/
- .
Doesn't replace model.name and base_dir
Please provide a complete working example that reproduces that. I was not able to reproduce.
config.yaml:
test1: first
test2: second
tests:
- ${test1}/${test2}
- ${test1}
main.py:
@hydra.main(config_path="config.yaml")
def main(args):
print(args.test1)
print(args.test2)
print(args.tests)
out:
first
second
['${test1}/${test2}', '${test1}']
Mhhh it actually works but I was thinking of it as a real list:
print(args.tests)
print(list(args.tests))
print([i for i in args.tests])
print([args.tests[0], args.tests[1]])
print([args.tests[i] for i in range(len(args.tests))])
out:
['${test1}/${test2}', '${test1}']
['${test1}/${test2}', '${test1}']
['${test1}/${test2}', '${test1}']
['first/second', 'first']
['first/second', 'first']
If you are converting to a list this is no longer an OmegaConf object.
The proper way to convert to a primitive list is to use:
resolved_list = args.tests.to_container(resolve=True)
Also, why do you even need to convert it to a primitive list?
Because I'm logging it and wanted to see the interpolated strings (which didn't work when just logging the OmegaConf object)