Shortcuts

XLACheckpointIO

class lightning.pytorch.plugins.io.XLACheckpointIO(*args, **kwargs)[소스]

기반 클래스: lightning.fabric.plugins.io.torch_io.TorchCheckpointIO

CheckpointIO that utilizes xm.save() to save checkpoints for TPU training strategies.

경고

This is an experimental feature.

save_checkpoint(checkpoint, path, storage_options=None)[소스]

Save model/training states as a checkpoint file through state-dump and file-write.

매개변수
  • checkpoint (Dict[str, Any]) – dict containing model and trainer state

  • path (Union[str, Path]) – write-target path

  • storage_options (Optional[Any]) – not used in XLACheckpointIO.save_checkpoint

예외 발생

TypeError – If storage_options arg is passed in

반환 형식

None