Questions tagged [fb-hydra]

Questions about Hydra, an open source Python framework by Facebook

182 questions
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
0 answers

How to customize hydra run dir and sweep subdir based on values of a sweep?

I am using hydra to organize my configurations and output folders for a project. This project involves first specifying a particular objective that can differ in a few parameters. Then that objective can be optimized by different kinds of…
0
votes
1 answer

Key 'optuna_config' not in 'OptunaSweeperConf' full_key: hydra.sweeper.optuna_config object_type=OptunaSweeperConf

I tried this tutorial but gives me this error Key 'optuna_config' not in 'OptunaSweeperConf' full_key: hydra.sweeper.optuna_config object_type=OptunaSweeperConf why is this error? this is my config.yaml hydra: run: dir:…
0
votes
1 answer

In hydra, can I interpolate config from a file without using the defaults list?

Say I have a directory utility_configs that has a bunch of different configurations for different things that are useful in different situations. And then I want to be able to use these different configs in different places. For instance, maybe my…
gmr
  • 712
  • 6
  • 17
0
votes
1 answer

Hydra - accessing parent of parent directory

is it possible to have a 2-degree sibling file as a default configuration? Files hierarchy: dir_1 ├── dir_1_1 │ └── dir_1_1_1 │ └── conf.yaml └── dir_1_2 └── dir_1_2_1 └── dataset_paths_1.yaml I want to have dataset_path…
Ilan Geffen
  • 179
  • 8
0
votes
1 answer

Hydra config: using another config as an input to multiple keys within a config

Suppose I have the following directory structure for my hydra configs: config |_config.yml operations |_subconfig.yml subconfig.yml is param_1: foo param_2: bar and config.yml is: operations: signals: signal_a: …
Alberto A
  • 1,160
  • 4
  • 17
  • 35
0
votes
1 answer

Hydra - Specifying config group with a keyword other than the directory

Say I have the following file structure: |--configs | |--config.yaml | |--A | |--conf1.yaml | |--conf2.yaml | |--conf3.yaml |--main_app.py and my base config.yaml looks like defaults: A: conf1 If I want to run some other config…
E9101
  • 1
  • 1
0
votes
0 answers

AttributeError: __aenter__ on asynchronous websocket python

I try to resolve this problem about asynchronous WebSocket using python. I don't know why when I used the asynchronous process I get the error log bellow. But my code is totally fine when I didn't used the asynchronous. error…
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
2 answers

Using multiple models with repeated keywords in `hydra`

I'm pretty new to hydra and I'm trying to better understand the config.yaml file. I'm undertaking a deep learning experiment where I have two separate models, an embedding network and a simple fully connected neural network. The first one is going…
James Arten
  • 523
  • 5
  • 16
0
votes
0 answers

RuntimeError: only batches of spatial targets supported (3D tensors) but got targets of size: : [50] Unet integration

I modified this repository to use hydra and add U-net model https://github.com/kuangliu/pytorch-cifar I run this: python3 main.py --config-name=unet_train params.epoch_count=5 I got this error, but when I run resnet and vgg I have no problem File…
0
votes
1 answer

How to access all file names in hydra config

I have a directory contains a bunch of txt files: dir/train/[train1.txt, train2.txt, train3.txt] I'm able to read a single file, if I define following in a config.yaml file_name: ${paths.data_dir}/train/train1.txt So I get the str and I used…
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
1 answer

How to use Hydra Config alongside user-defined parameters?

Is there a way to use Hydra Config alongside other parameters? I want some arguments to be defined in the code, and others to be read from the config file. @hydra.main(config_path="conf", config_name="vehicle_manager") def __init__(self, client:…
Aadam
  • 345
  • 1
  • 3
  • 12