fix: dont save component initializer as hparm
This commit is contained in:
parent
60d2a1d2c9
commit
1be7d7ec09
@ -33,7 +33,10 @@ class BaseYArchitecture(pl.LightningModule):
|
|||||||
del hparams["initialized_proto_shape"]
|
del hparams["initialized_proto_shape"]
|
||||||
hparams = self.HyperParameters(**hparams)
|
hparams = self.HyperParameters(**hparams)
|
||||||
else:
|
else:
|
||||||
self.save_hyperparameters(hparams.__dict__)
|
self.save_hyperparameters(
|
||||||
|
hparams.__dict__,
|
||||||
|
ignore=["component_initializer"],
|
||||||
|
)
|
||||||
|
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
@ -217,7 +220,6 @@ class BaseYArchitecture(pl.LightningModule):
|
|||||||
self.update_metrics_epoch()
|
self.update_metrics_epoch()
|
||||||
|
|
||||||
def on_save_checkpoint(self, checkpoint: dict[str, Any]) -> None:
|
def on_save_checkpoint(self, checkpoint: dict[str, Any]) -> None:
|
||||||
checkpoint["hyper_parameters"]["component_initializer"] = None
|
|
||||||
checkpoint["hyper_parameters"] = {
|
checkpoint["hyper_parameters"] = {
|
||||||
'hparams': checkpoint["hyper_parameters"]
|
'hparams': checkpoint["hyper_parameters"]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user