TorchCheckpointIO¶
- class pytorch_lightning.plugins.io.TorchCheckpointIO[source]¶
Bases:
pytorch_lightning.plugins.io.checkpoint_plugin.CheckpointIOCheckpointIO that utilizes
torch.save()andtorch.load()to save and load checkpoints respectively, common for most use cases.- load_checkpoint(path, map_location=<function TorchCheckpointIO.<lambda>>)[source]¶
Loads checkpoint using
torch.load(), with additional handling forfsspecremote loading of files.- Parameters
- Return type
Returns: The loaded checkpoint.
- Raises
FileNotFoundError – If
pathis not found by thefsspecfilesystem