
    [Th%                     Z    S SK JrJrJr  S SKJr  SS/r\ " S S\5      5       r\" S\S9rg)    )Anyruntime_checkableTypeVar)ProtocolStateful	StatefulTc                   L    \ rS rSrSrS\\\4   4S jrS\\\4   SS4S jr	Sr
g)	r      zF
Stateful protocol for objects that can be checkpointed and restored.
returnc                     g)ai  
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    ]/var/www/auris/envauris/lib/python3.13/site-packages/torch/distributed/checkpoint/stateful.py
state_dictStateful.state_dict   s     	    r   Nc                     g)zp
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_dictStateful.load_state_dict   s     	r   r   )__name__
__module____qualname____firstlineno____doc__dictstrr   r   r   __static_attributes__r   r   r   r   r      s6    DcN "$sCx. T r   )boundN)	typingr   r   r   typing_extensionsr   __all__r   r   r   r   r   <module>r"      sD    2 2 & {
# x  B Kx0	r   