This repository has been archived by the owner on Nov 21, 2022. It is now read-only.
How to let lightning store hyperparameters in checkpoint when working with Hydra configs? #234
Unanswered
mariomeissner
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@SeanNaren, mind haveing a look? :) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my personal hydra lightning setup, I am passing certain instantiated objects as parameters to my model (e.g. a loss function). It's convenient because I can say
_target_: torch.nn.CrossentropyLoss
in the config file.The problem is that lightning will fail to store the hyperparameters in the checkpoint file because it is not pickable. How can I make this work? I ask here because I assume that this problem had to be somehow overcome here too, but a quick look at the source code didn't give me the answer yet.
Interestingly, inside the lightning checkpoint saving code, there is some logic trying to identify if we are working with OmegaConf containers, but it's still not straightforward for me to adapt my code to this situation.
Beta Was this translation helpful? Give feedback.
All reactions