
    VhI                         d dl Z d dlZd dlmZ d dlmZmZ d dlmZ	 d dl
mZ d dlmZ d dlmZ  G d de j                         Zy)	    N)Future)OptionalUnion)STATE_DICT_TYPE)SavePlanner)StorageWriterc                       e Zd Zej                  ddddddedeeej                  df   de
e   de
e   de
ej                     defd	       Zy)
_AsyncCheckpointExecutorN)checkpoint_idstorage_writerplannerprocess_groupstaged_state_dictr   r   r   r   returnc                     y)aE  
        Execute the checkpoint save request asynchronously.

        This method is intended to be used as an abstraction for
        implementing async checkpointing. The actual checkpoint save
        operation is executed in a separate thread or process depending
        on the implementation of this interface.
        N )selfr   r   r   r   r   s         \/home/dcms/DCMS/lib/python3.12/site-packages/torch/distributed/checkpoint/_async_executor.pyexecute_savez%_AsyncCheckpointExecutor.execute_save   s        )__name__
__module____qualname__abcabstractmethodr   r   strosPathLiker   r   r   distProcessGroupr   r   r   r   r   r
   r
      s    
 8<26)-59* S"++t34	
 !/ +&   1 12 
 r   r
   )r   r   concurrent.futuresr   typingr   r   torch.distributeddistributedr   %torch.distributed.checkpoint.metadatar   $torch.distributed.checkpoint.plannerr   $torch.distributed.checkpoint.storager   ABCr
   r   r   r   <module>r)      s/     	 % "   A < >sww r   