§
    Ÿ²ÅjU  ã                   óx   — d dl mZmZmZmZ d dlmZ ddgZe G d„ de¦  «        ¦   «         Z ede¬¦  «        Z	dS )é    )ÚAnyÚDictÚruntime_checkableÚTypeVar)ÚProtocolÚStatefulÚ	StatefulTc                   óN   — e Zd ZdZdeeef         fd„Zdeeef         ddfd„ZdS )r   zN
    Stateful protocol for objects that can be checkpointed and restored.
    Úreturnc                 ó   — dS )a±  
        Objects should return their state_dict representation as a dictionary.
        The output of this function will be checkpointed, and later restored in
        `load_state_dict()`.

        .. warning::
            Because of the inplace nature of restoring a checkpoint, this function
            is also called during `torch.distributed.checkpoint.load`.


        Returns:
            Dict: The objects state dict
        N© )Úselfs    úVC:\Projects\Historical\venv\Lib\site-packages\torch/distributed/checkpoint/stateful.pyÚ
state_dictzStateful.state_dict   s	   € ð 	ˆó    r   Nc                 ó   — dS )z�
        Restore the object's state from the provided state_dict.

        Args:
            state_dict: The state dict to restore from
        Nr   )r   r   s     r   Úload_state_dictzStateful.load_state_dict   s	   € ð 	ˆr   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ústrr   r   r   r   r   r   r   r      sk   € € € € € ðð ð˜D  c œNð ð ð ð ð"¨$¨s°C¨x¬.ð ¸Tð ð ð ð ð ð r   )ÚboundN)
Útypingr   r   r   r   Útyping_extensionsr   Ú__all__r   r	   r   r   r   ú<module>r      s™   ðØ 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ø &Ð &Ð &Ð &Ð &Ð &ð �{Ð
#€ð ðð ð ð ð ˆxñ ô ñ ÔððB ˆG�K xÐ0Ñ0Ô0€	€	€	r   