
    }Yh                     J    d dl mZmZ d dlZe G d de                      ZdS )    )Protocolruntime_checkableNc                   d    e Zd ZdZdededee         fdZdee         fdZde	de
j        fdZd	S )
_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.
    fqnobjectreturnc                      t          d          )zI
        Return a list of WriteItems based on object's contents.
        z6_Checkpointable._create_write_items is not implementedNotImplementedError)selfr   r   s      s/var/www/tools.fuzzalab.pt/emblema-extractor/venv/lib/python3.11/site-packages/torch/distributed/_checkpointable.py__create_write_items__z&_Checkpointable.__create_write_items__   s     "D
 
 	
    c                      t          d          )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
 
 	
r   indexc                      t          d          )zI
        Return a 'torch.Tensor' shard based on 'MetadataIndex'.
        z4_Checkpointable._get_tensor_shard is not implementedr   )r   r   s     r   __get_tensor_shard__z$_Checkpointable.__get_tensor_shard__   s     "B
 
 	
r   N)__name__
__module____qualname____doc__strr   listr   r   inttorchTensorr    r   r   r   r      s         
# 
v 
$v, 
 
 
 

tF| 
 
 
 

# 
%, 
 
 
 
 
 
r   r   )typing_extensionsr   r   r   r   r   r   r   <module>r!      sg    9 9 9 9 9 9 9 9  
 
 
 
 
h 
 
 
 
 
r   