+
    &j3                     "  a  R t0 t ^ RIt^ RIt^ RIt^ RIHt ^ RIHtHt ^ RI	H
t
 ^ RIHt ^ RIHu Ht ^ RIHt ]P$                  ! 4       t. t] ^ k ]P*                  ! ]4      s]! R4      t]
! R4      tR	 R
 ltR R ltRR R lltR R ltR# )    N)Callable)AnyTypeVar)	ParamSpec)uuid4)DCP_LOGGER_NAME_T_Pc                F    V ^8  d   QhR\         \        \        3,          /#    returndictstrr   )formats   "{/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/distributed/checkpoint/logger.py__annotate__r      s        tCH~      c                    / pVP                  R4      pVP                  R4      pVP                  R4      pVP                  R4      pV'       g"   T;'       g    T;p'       d   \        VRR4      pVe   \        V4      MTVR&   \        \        4       P                  4      VR&   V'       d   VP
                  P                  VR&   V'       d   VP
                  P                  VR&   V'       d   VP
                  P                  VR&   V# )z(
Extracts log data from dcp method args
storage_writerstorage_readerplannercheckpoint_idNuuid)getgetattrr   r   int	__class____name__)argskwargsmsg_dictr   r   r   r   
serializers   *,      r   _msg_dict_from_dcp_method_argsr%      s     H ZZ 01NZZ 01Njj#GJJ/MN,L,LnLjL
OTB ,7M] _ 57;;'HV%3%=%=%F%F!"%3%=%=%F%F!"%//88Or   c                F    V ^8  d   QhR\         \        \        3,          /# r   r   )r   s   "r   r   r   >   s      c3h r   c                 n    \        V/ VB pVP                  \        P                  ! V .VO5/ VB 4       V# )N)r%   updatec10d_logger_get_msg_dict)	func_namer!   r"   r#   s   &*, r   r*   r*   >   s7    -t>v>HOOK--iI$I&IJOr   c          
          V ^8  d   QhR\         R\        R\        \        \        \        3,          .\        \        \        3,          3,          /# )r   log_exceptionswrapper_kwargsr   )boolr   r   r
   r	   )r   s   "r   r   r   E   sC     ) ))47)xB (2r6"223)r   c                   a a R V V3R llpV# )zKThis method decorator logs the start, end, and exception of wrapped events.c                F    V ^8  d   QhR\         \        \        3,          /# )r   func)r   r
   r	   )r   s   "r   r   (_dcp_method_logger.<locals>.__annotate__J   s     " "R( "r   c                 R   <a  \         P                  ! S 4      R  V VV3R ll4       pV# )c                d    V ^8  d   QhR\         P                  R\         P                  R\        /# )r   r!   r"   r   )r
   r!   r"   r	   )r   s   "r   r   ;_dcp_method_logger.<locals>.decorator.<locals>.__annotate__L   s)     	 	277 	bii 	B 	r   c                    < \        SP                  .V O5/ / S	CVCB pR VR&   \        P                  ! 4       pW2R&   SVR&   \        P                  V4        S! V / VB pRTR&   \        P                  ! 4       p\        P                  ! 4       TR&   Yc,
          TR&   \        P                  T4       T#   \         dG   pS'       d9   RTR&   T TR&   \        P                  ! 4       TR&   \        P                  T4       h Rp?ii ; i)	starteventtimer-   	exceptionerrorNendtimes_spent)r*   r    r:   time_ns_dcp_loggerdebugBaseExceptionr<   )
r!   r"   r#   t0resultr<   t1r2   r-   r.   s
   *,     r   wrapper6_dcp_method_logger.<locals>.decorator.<locals>.wrapperK   s   $ $(D>(DV(DH
 !(HWB!V)7H%&h't.v. !&HWB#||~HV&(gH]#h'M ! !(3HW%+0'HW%'+||~HV$%%h/s   B4 4D?AD  D)	functoolswraps)r2   rF   r-   r.   s   f r   	decorator%_dcp_method_logger.<locals>.decoratorJ   s+    			 	 
	@ r    )r-   r.   rJ   s   fl r   _dcp_method_loggerrM   E   s    
" "H r   c                $    V ^8  d   QhR\         /# )r   rank)r   )r   s   "r   r   r   q   s      s r   c                 4   \         P                  \        P                  4       \        P                  ! 4       pVP                  \        P                  4       \        P
                  ! R V  R24      pVP                  V4       \         P                  V4       R# )[z6] %(asctime)s - %(name)s - %(levelname)s - %(message)sN)loggersetLevelloggingINFOStreamHandler	FormattersetFormatter
addHandler)rO   ch	formatters   &  r   _init_loggerr\   q   si    
OOGLL!				 BKK!!
D6GHI OOI
br   c                V    V ^8  d   Qh/ ^ \         9   d   \        \        ,          ;R&   # )r   __all__)__conditional_annotations__listr   )r   s   "r   r   r      s        c  r   )F)r_   rH   rT   r:   collections.abcr   typingr   r   typing_extensionsr   r   r   torch.distributed.c10d_loggerdistributedr)   -torch.distributed.checkpoint.logging_handlersr   	getLoggerrR   r^   _get_or_create_loggerr@   r	   r
   r%   r*   rM   r\   r   )r_   s   @r   <module>ri      s{        $  '  3 3 I 
			   //@T]t_ F)Xr   