Replies: 1 comment 6 replies
-
I believe what you're trying to achieve would look like: # config/model/task1/bert.yaml
defaults:
- /trainer/tasks@trainer: phase2 # <== this is the change -- might not be required, but looks cleaner
- _self_
#model parameters here...
###########
# model specific trainer configuration
trainer:
max_epochs: 99 And then python main.py +trainer@model.task1.trainer=ddp |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am trying to use Hydra to manage complex configurations for a deep learning project. I've encountered a challenge when attempting to merge nested configurations dynamically.
Directory Structure:
Motivation:
model.task1.trainer
,model.task2.trainer
, viaHowever, I can only mange it to by calling
python main.py model.task1.trainer.strategy=ddp model.task1.trainer.sync_batchnorm=True
. It will prompt item already exist error if I dopython main.py +model.task1.trainer=trainer/ddp
.Is there a native way in Hydra to overwrite nested configurations dynamically based on command line inputs? (e.g. only overwriting new key values. In this case, strategy=ddp and sync_batchnorm=True)
Beta Was this translation helpful? Give feedback.
All reactions