Shortcuts

cloud_io

Functions

atomic_save

Saves a checkpoint atomically, avoiding the creation of incomplete checkpoints.

get_filesystem

rtype:

AbstractFileSystem

load

Loads a checkpoint.

Utilities related to data saving/loading.

pytorch_lightning.utilities.cloud_io.atomic_save(checkpoint, filepath)[source]

Saves a checkpoint atomically, avoiding the creation of incomplete checkpoints.

Parameters:
  • checkpoint (Dict[str, Any]) – The object to save. Built to be used with the dump_checkpoint method, but can deal with anything which torch.save accepts.

  • filepath (Union[str, Path]) – The path to which the checkpoint will be saved. This points to the file that the checkpoint will be stored in.

Return type:

None

pytorch_lightning.utilities.cloud_io.load(path_or_url, map_location=None)[source]

Loads a checkpoint.

Parameters:
Return type:

Any