[Question] Override default hydra configuration
See original GitHub issueFor organizing experiments (using the example from the doc), we could override the defaults values in file
experiment/nglite.yaml
with
# @package _global_
defaults:
- override /db: sqlite
- override /server: nginx
server:
port: 8080
Is it possible to override the hydra config within the same file? I tried
# @package _global_
defaults:
- override /hydra: some_config
but would result an error Could not override 'hydra'. Did you mean to override hydra?.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Basic Override syntax - Hydra
You can manipulate your configuration with overrides (via the command line or the Compose API). This includes: Modifying the Defaults List; Modifying the ......
Read more >hydra - structured config group/package override via yaml
Trying to explain my problem using the example (files and folder structre) from the hydra documentation https://hydra.cc/docs/tutorials/ ...
Read more >Hydra: Overview — Maze documentation - Read the Docs
Config Root & Defaults explains how the root config file works and how default components are specified. Overrides show how you can easily...
Read more >Difference between facebook Hydra's + and ++ operators
my_app.py import hydra from omegaconf import OmegaConf, ... Overriding a config value ( foo.bar=value ) works only if the given key is ...
Read more >modulus.hydra.config - NVIDIA Documentation Center
[docs]@dataclass class DefaultModulusConfig(ModulusConfig): # Core defaults # Can over-ride default with "override" hydra command defaults: List[Any] ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @jieru-hu @Jasha10, Sorry I didn’t explain my question well. I’m using Hydra 1.1.0.rc1.
What I’m trying to do is having a single file containing all the configs related to a certain experiment (some specific model, trainer, logger, etc) in
configs/experiment/experiment1.yaml
. Normally all the logs are inlogs/runs/some_date/some_time
as normal, but when I run some experiments, the logs would be changed to another direxperiment/experiment_name/version
.My minimum config files looks as follow
Inside
configs/config.yaml
, there is already a default hydra configurationconfigs/hydra/default.yaml
hasconfigs/hydra/experiment.yaml
hasconfigs/experiment/experiment1.yaml
hasThe desired behavior is to run with flag
python main.py experiment=experiment1
and then the logs would automatically be insideexperiment/some_exp/v1
instead of the default log dir. I’m not sure if this is the right approach.Closing, feel free to reopen and provide the requested info.