Hyperparameters Callback
Callback saving CAREamics configuration as hyperparameters in the model.
HyperParametersCallback
Bases: Callback
Callback allowing saving CAREamics configuration as hyperparameters in the model.
This allows saving the configuration as dictionary in the checkpoints, and loading it subsequently in a CAREamist instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Configuration
|
CAREamics configuration to be saved as hyperparameter in the model. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
config |
Configuration
|
CAREamics configuration to be saved as hyperparameter in the model. |
on_train_start(trainer, pl_module)
Update the hyperparameters of the model with the configuration on train start.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trainer
|
Trainer
|
PyTorch Lightning trainer, unused. |
required |
pl_module
|
LightningModule
|
PyTorch Lightning module. |
required |