Questions tagged [fb-hydra]

Questions about Hydra, an open source Python framework by Facebook

182 questions
0
votes
1 answer

hydra experiment override order

hydra experiment sample: # @package _global_ defaults: - override /segment: segment_RGB look_up_region : 20 below hydra config which in experiment mode will pass final value of look_up_region equal to 10: defaults: - segment: segment_CMYK …
Ninja
  • 127
  • 10
0
votes
1 answer

Hydra config for cascade processing

I am new to python and hydra and i am using hydra multirun for a cascade image processing. Trying to use hydra-config as something like preset. Considering an application using cascade functions which all of them read parameters from hydra…
0
votes
2 answers

How to reuse a package multiple times in a config?

I have a general camera config yaml, where the only thing that usually changes between specific cameras is the IP address. Some fields (in the following example fps) remain the same. Can I do something like this in…
Michael Litvin
  • 3,976
  • 1
  • 34
  • 40
0
votes
1 answer

specializing configuration with files instead of variables in Hydra config

I'd like to use specialized configuration as per Hydra documentation in Common Patterns -> Specializing Configuration. The difference is that my specialized configuration is in a file, not just one variable. In the example below I want to choose…
0
votes
1 answer

hydras sweep with Ax across different config groups

I have a config group called scheduler which contains many optimizers scheduler, each one has it's own parameters. Is it possible to create a sweep such that I can explore many schedulers and in the same time at each scheduler explore different…
0
votes
1 answer

Set a structured config as node value for an attribute in yaml configuration file

I would like to set a structured config as a default node value for some entry. I am not sure how to accomplish this. I have tried the following: defaults: - trainer: /trainer_lib/trainer/base_trainer" where /trainer_lib/trainer/base_trainer has…
Zranz
  • 57
  • 9
0
votes
1 answer

Access hydra configuration within decorated method

I would like to access hydra configuration, e.g., sweeper, from the decorated function: @hydra.main(config_name="config") def my_app(cfg: Config) -> None: OmegaConf.to_yaml(cfg.hydra.sweeper) Is there any parameter I can pass to @hydra.main()…
Zranz
  • 57
  • 9
0
votes
1 answer

Is it possible to specify paths in a configuration file that are relative to the configuration file location?

I have a complex config search path consisting of multiple locations where each location looks similar to this: ├── conf │ └── foo │ ├── foo.yaml │ └── bar.yaml └── files ├── foo.txt └── bar.txt with foo.yaml: # @package…
0
votes
1 answer

Is there a way to run experiment when it's located outside of folder containing main config?

So I have the following structure: project_config.yaml is the main config file: @hydra.main(config_path="configs/project_config", config_name="project_config.yaml") def my_app(cfg: DictConfig) -> None: print(OmegaConf.to_yaml(cfg)) Hovewer,…
0
votes
1 answer

Set Hydra default config in the decorator

Is there a way to define the default config in the hydra decorator and w/o saving it to any yaml file? For some small scripts it might be very hande. Something like this: @hydra.main(default={var1='default_value1', var2='xxx'}) def main(cfg): …
Temak
  • 2,929
  • 36
  • 49
0
votes
1 answer

Confirm recursive instantiation will allow hierarchical object instantiation

I'd like to be able to write a yaml file something like: runner: _target_: my_module.Runner lightning_module: _target_: my_module.MyLightingModule precision: 16 data_module: _target_: my_module.MyDataModule …
Hugh Perkins
  • 7,975
  • 7
  • 63
  • 71
0
votes
1 answer

How to disable change of directory?

How to disable change of directory? Currently, all the relative paths in my config are interpreted relative to the hydra output folder, not relative to current working folder. I'd like to be able to disable this options somehow please.
Hugh Perkins
  • 7,975
  • 7
  • 63
  • 71
0
votes
1 answer

Run hydra configured project with SLURM and Horovod

Right now, I am using Horovod to run distributed training of my pytorch models. I would like to start using hydra config for the --multirun feature and enqueue all jobs with SLURM. I know there is the Submitid plugin. But I am not sure, how would…
JAV
  • 279
  • 2
  • 9
0
votes
1 answer

Passing multiple config groups

In my config.yaml, how to pass two datasets for e.g. cifar and cinic at once? Can I pass a multiple config groups to the defaults list? This is for the case when I want to train my model on a mix of datasets, but I do not want to create a config…
pseudo_teetotaler
  • 1,485
  • 1
  • 15
  • 35
-1
votes
1 answer

Importing `YAML` files inside `experiment.yaml` files

Context: using hydra to run experiments with several settings in yaml files. Assume workd_dir is defined in the inference_root.yaml file, e.g.: work_dir: ${hydra:runtime.cwd} Further assume the following experiment.yaml structure, where we would…
trdavidson
  • 1,051
  • 12
  • 25
1 2 3
12
13