Consider the following yaml file for hydra config:
a:
b: !!python/object/apply:pathlib.PosixPath
- /my/path/to/dir
How would I override a.b so that is stays PosixPath after providing a new path?
Running
python my_app.py…
I am using hydra for the configuration of deep learning projects. I want to put together several datasets for the training. As the number of datasets is a priori not defined, I want to get the datasets as a list. I want to define them as defaults in…
I have a code that looks something like this:
def generate_constraints(c):
if c.name == 'multibodypendulum':
con_fnc = MultiBodyPendulum(**c)
where c is an OmegaConf object containing a bunch of parameters. Now I would like to pass all…
I'm working through this Hydra doc example to override the main config with an experiment config. I'm trying to override main with experiment and I'm not sure where I'm going wrong.
The error I get is:
Exception has occurred: ConstructorError
while…
I have the following project setup:
configs/
├── default.yaml
└── trainings
├── data_config
│ └── default.yaml
├── simple.yaml
└── schema.yaml
The content of the files are as follows:
app.py:
from dataclasses import dataclass
from…
I got a traceback call: "TypeError: init() got an unexpected keyword argument 'period'"
, and I'm not sure where the keyword argument 'period' is coming from .(This is my first time using stackoverflow , so if more detail is needed I'll try my best…
Question
I am experimenting with the OmegaConf library and am having trouble with the OmegaConf.merge method. Referring to the project structure, there are two configuration files. When using the OmegaConf.merge method, it combines both the…
Here is my current config structure
hydra/
pipeline/
common/
feature.yaml
stage/
train.yaml
with the following files:
train.yaml
# @package _global_
defaults:
- _self_
- ../pipeline/common@train: feature
-…
I have a question about SageMaker and Hydra.
TL;DR
Is there a way to pass arguments from SageMaker estimator to a Hydra script? Currently it passes parameters in a very strict way.
Full Question
I use Hydra in order to pass configs to my training…
I have some config file, model/foo.yaml:
# @package _global_
# foo.yaml
MODEL:
BACKBONE:
OUT_FEATURES: [c4, c5]
HEAD:
IN_FEATURES: ${MODEL.BACKBONE.OUT_FEATURES}
There are no issues with variable interpolation when I point to this…
constants_config.yaml
site: fb
another_site: google
my_config.yaml
my_site: ${constants_config.yaml]
Resulting my_config.yaml
my_site: fb
I just want to get a single constant, not the whole constants_config.yaml (which is done by using default)
Let's say I have a config like the following:
foo:
a : 1
b : 2
c :
aa : ???
bb : 2
bar : ${foo.c}
baz : ${foo.c}
and want to specialise (or override) aa in bar and baz. Is there a clean way to do this? I can't see how to do this with…
I am trying to automatically convert
from omegaconf import OmegaConf
s = """
nodes:
node1:
group: standard
status: online
node2:
group: small
status: online
node3:
group: standard
status: offline
"""
into a list of nodes,…
I am using OmegaConf to read a .yaml configuration file (file path is given through hydra).
After I edit it, I want to save the file again. Possibly using:
OmegaConf.save(conf, filepath, resolve=True)
However, I cannot figure out how to get the…