TorchCheckpointIO¶
- class lightning.pytorch.plugins.io.TorchCheckpointIO[source]¶
Bases:
lightning.fabric.plugins.io.checkpoint_io.CheckpointIO
CheckpointIO that utilizes
torch.save()
andtorch.load()
to save and load checkpoints respectively, common for most use cases.Warning
This is an experimental feature.
- load_checkpoint(path, map_location=<function TorchCheckpointIO.<lambda>>)[source]¶
Loads checkpoint using
torch.load()
, with additional handling forfsspec
remote loading of files.- Parameters
Returns: The loaded checkpoint.
- Raises
FileNotFoundError – If
path
is not found by thefsspec
filesystem- Return type