Skip to content

Interpolation and Accessing environment variables and other resolvers inside the config.yaml similar to OmegaConf #243

Description

@svenstehle

Is your feature request related to a problem? Please describe.
Cannot access e.g., environment variables in config (can I access and compose from other config variables and append to them?). This would be the oc.env resolver.

Maybe a separate feature request but Spock already offers some (or all, haven't checked?) of the oc.decode functionality.

Describe the solution you'd like
save_path: ${oc.env:PWD}/runs

and

some_value: path_to_a_base_dir
composed_value: ${path_to_a_base_dir}/some_other_dir
composed_value_building_on_that: ${composed_value}/another_sub_dir

More examples found in OmegaConf.

Describe alternatives you've considered
Nick mentioned this might be done with the underlying library attrs (?)

Additional context
Started discussing the idea in this issue

Thanks for considering to work on this :)
As I already mentioned in the other thread/issue: happy to help, but no idea where to begin and how to move into a worthwhile direction without guidance. Would love to work on this together though.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions