Careamics Checkpoint Info Callback
Lightning callback for storing CAREamics configuration in checkpoints.
CareamicsCheckpointInfo
Bases: Callback
Callback to save CAREamics configuration in Lightning checkpoints.
This callback automatically stores CAREamics version, experiment name, and training configuration in the checkpoint file for reproducibility.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
careamics_version
|
str
|
Version of CAREamics used for training. |
required |
experiment_name
|
str
|
Name of the experiment. |
required |
training_config
|
TrainingConfig
|
Training configuration to store in checkpoint. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
careamics_version |
str
|
Version of CAREamics used for training. |
experiment_name |
str
|
Name of the experiment. |
training_config |
TrainingConfig
|
Training configuration to store in checkpoint. |
on_save_checkpoint(trainer, pl_module, checkpoint)
Lightning hook called when saving a checkpoint.
Adds CAREamics configuration to the checkpoint dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trainer
|
Trainer
|
Lightning trainer instance. |
required |
pl_module
|
LightningModule
|
Lightning module being trained. |
required |
checkpoint
|
dict[str, Any]
|
Checkpoint dictionary to modify. |
required |