-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Thanks to self.save_hyperparameters() all init argument are available via self.hparams or the immutable self.hparams_initial. This means it is not necessary to use dataclass for reducing boilerplate.
Also, consider removing writing to hparams.yaml since this can take a long time if the model is large. See also:
- Do not save the weights of the model to hparams.yaml Lightning-AI/pytorch-lightning#11494 (comment)
- https://lightning.ai/docs/pytorch/stable/common/lightning_module.html#id2
- Incorrect
.hparamswhen usingLightningCLIwithCallableLightning-AI/pytorch-lightning#20726
Note
Care must be taken when using the LightningCLI because it seems that self.hparams will store the (un)instantiated object as dict.
Metadata
Metadata
Assignees
Labels
No labels