Questions tagged [omegaconf]

Questions about OmegaConf

OmegaConf is a flexible Python configuration library. Use this tag to ask questions about it.

54 questions
0
votes
0 answers

omegaconf errors. validation error line 896

I am total beginner so be easy on me. I got Retrieval-based-Voice-Conversion-WebUI when I try to run it on my mac I get the following message: file…
0
votes
1 answer

Easiest way to override PosixPath in hydra

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…
Proko
  • 1,871
  • 1
  • 11
  • 23
0
votes
0 answers

How to gather several datasets (dataset configurations) in a list with hydra?

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…
nemo
  • 58
  • 6
0
votes
2 answers

OmegaConf - how to delete a single parameter

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…
Tue
  • 371
  • 1
  • 14
0
votes
1 answer

Overriding Hydra config with experiment

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…
KSHMR
  • 741
  • 1
  • 9
  • 24
0
votes
1 answer

Schema validation in Hydra not working when configuration path is parent folder

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…
Gros Lalo
  • 1,078
  • 7
  • 20
0
votes
0 answers

TypeError: __init__() got an unexpected keyword argument 'period'

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…
0
votes
1 answer

OmegaConf - Merging multiple files with name as key

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…
Raymond C.
  • 572
  • 4
  • 24
0
votes
1 answer

How to use a config group multiple times, while overriding each instance

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 -…
wc250
  • 129
  • 3
  • 10
0
votes
2 answers

Using SageMaker with Hydra

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…
David Lasry
  • 829
  • 3
  • 12
  • 31
0
votes
1 answer

Hydra: how to use variable interpolation in packaged configs

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…
Alnitak
  • 2,068
  • 2
  • 12
  • 24
0
votes
1 answer

Is it possible to import just a single configuration parameter, not all in Hydra?

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)
0
votes
1 answer

hydra override an interpolated dict value in .yaml config

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…
0
votes
1 answer

OmegaConf: convert dict into List of Objects

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,…
DragonTux
  • 732
  • 10
  • 22
0
votes
1 answer

How to get the file path of a loaded OmegaConf configuration

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…
anxiousPI
  • 183
  • 1
  • 12