L i<ddlmZmZddlZeGddeZy))Protocolruntime_checkableNc`eZdZdZdededeefdZdeefdZde de jfdZ y ) _Checkpointablea Interface for checkpointable objects. Implemented as a protocol, implicit subtyping is supported so subclasses do not need to inherit this explicitly. This is to allow arbitrary objects/tensor subclasses to hook into DCP seamlessly through implementing the interface. fqnobjectreturnctd)zI Return a list of WriteItems based on object's contents. z6_Checkpointable._create_write_items is not implementedNotImplementedError)selfrrs g/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/torch/distributed/_checkpointable.py__create_write_items__z&_Checkpointable.__create_write_items__s" D  ctd)zU Return a list of `ChunkStorageMetadata` based on object's contents. z5_Checkpointable._create_chunk_list is not implementedr )r s r__create_chunk_list__z%_Checkpointable.__create_chunk_list__s" C  rindexctd)zI Return a 'torch.Tensor' shard based on 'MetadataIndex'. z4_Checkpointable._get_tensor_shard is not implementedr )r rs r__get_tensor_shard__z$_Checkpointable.__get_tensor_shard__s" B  rN) __name__ __module__ __qualname____doc__strrlistrrinttorchTensorrrrrrsL  # v $v,  tF|  # %,, rr)typing_extensionsrrrrrrrr!s&9  h  r