CheckpointIO¶
- class lightning.fabric.plugins.io.checkpoint_io.CheckpointIO[source]¶
- Bases: - ABC- Interface to save/load checkpoints as they are saved through the - Strategy.- Warning - This is an experimental feature. - Typically most plugins either use the Torch based IO Plugin; - TorchCheckpointIObut may require particular handling depending on the plugin.- In addition, you can pass a custom - CheckpointIOby extending this class and passing it to the Trainer, i.e- Trainer(plugins=[MyCustomCheckpointIO()]).- Note - For some plugins, it is not possible to use a custom checkpoint plugin as checkpointing logic is not modifiable. - abstract load_checkpoint(path, map_location=None)[source]¶
- Load checkpoint from a path when resuming or loading ckpt for test/validate/predict stages. - Parameters:
- Return type:
 - Returns: The loaded checkpoint.