Cannot override value in instantiate #2223
Unanswered
fColangelo
asked this question in
Q&A
Replies: 1 comment
-
Cross-link to related stackoverflow question: https://stackoverflow.com/questions/72263277/hydra-cannot-override-value-in-instantiate/72390561?noredirect=1#comment127929535_72390561 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I am having a problem overriding a value when instantiating an object and can't seem to find out why. Basically, I am instantiating a Pytorch dataset object using hydra instantiate, passing the cfg object to the Dataset object being instantiated. To do this, the dataset cfg contains an empty cfg object:
And, at runtime, the cfg object should be overwritten by the instantiate call:
However, when debugging I see that the empty cfg overwrite does not happen and the dataset is instantiated with the empty, default cfg.
From what I understood of the documentation, specifying a value with the same name should override the default. Can someone help me understand what I am doing wrong?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions