+
    –°³jµ   ã                   óÀ   € ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
HtHt ^ RIHt R.tR R ltR	 R
 ltR R ltR R ltR R lt ! R R4      tR# )é    N)ÚCallable)Ú	timedelta)ÚEventÚThread)ÚAnyÚparse_rendezvous_endpointc                óR   € V ^8„  d   QhR\         R\        \         \         3,          /# )é   Ú
config_strÚreturn)ÚstrÚdict)Úformats   "Úk/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/distributed/elastic/rendezvous/utils.pyÚ__annotate__r      s"   € ÷ #ñ #¬ð #´´c¼3°hµñ #ó    c                óX  € / pV P                  4       p V '       g   V# V P                  R4      pV Fv  pVP                  R^4      vrEVP                  4       pV'       g   \        R4      hV'       d   V^ ,          P                  4       pMRpV'       g   \        RV R24      hWaV&   Kx  	  V# )z—Extract key-value pairs from a rendezvous configuration string.

Args:
    config_str:
        A string in format <key1>=<value1>,...,<keyN>=<valueN>.
Ú,Ú=zZThe rendezvous configuration string must be in format <key1>=<value1>,...,<keyN>=<valueN>.Nz%The rendezvous configuration option 'z' must have a value specified.)ÚstripÚsplitÚ
ValueError)r   ÚconfigÚ
key_valuesÚkvÚkeyÚvaluesÚvalues   &      r   Ú_parse_rendezvous_configr      s²   € ð  €Fà×!Ñ!Ó#€JßØˆà×!Ñ! #Ó&€JÛˆØ—x‘x  QÓ'ˆˆà�i‰i‹kˆßÜð7óð ÷ Ø˜1•I—O‘OÓ%‰EàˆEßÜØ7¸°uÐ<ZÐ[óð ð ˆs‹ñ) ð* €Mr   c                ó>   € V ^8„  d   QhR\         R\        R,          /# )r
   Úport_strr   N)r   Úint)r   s   "r   r   r   =   s   € ÷ ñ œcð ¤c¨D¥jñ r   c                óf   € V '       d)   \         P                  ! RV 4      '       d   \        V 4      # R# )z1Try to extract the port number from ``port_str``.z^[0-9]{1,5}$N)ÚreÚmatchr"   )r!   s   &r   Ú_try_parse_portr&   =   s"   € ç”B—H’H˜_¨h×7Ò7Ü�8‹}ÐÙr   c                ól   € V ^8„  d   QhR\         R,          R\        R\        \         \        3,          /# )r
   ÚendpointNÚdefault_portr   )r   r"   Útuple)r   s   "r   r   r   D   s0   € ÷ .ñ .Ü�D�jð.Ü(+ð.ä
Œ3”ˆ8…_ñ.r   c                óî  € V e   V P                  4       p V '       g   RV3# V ^ ,          R8X  d   V R
,          R8X  d	   V .. O5vr#MV P                  R^4      vr#\        V4      ^8”  d"   V^ ,          R8X  d   VR
,          R8X  d   V^R
 p\        V4      ^8X  d.   \        V^ ,          4      pVe   VR8¼  d   \	        RV  R24      hMTp\
        P                  ! RV4      '       g   \	        RV  R	24      hW$3# )a  Extract the hostname and the port number from a rendezvous endpoint.

Args:
    endpoint:
        A string in format <hostname>[:<port>].
    default_port:
        The port number to use if the endpoint does not include one.

Returns:
    A tuple of hostname and port number.
Ú	localhostÚ[Ú]Ú:z,The port number of the rendezvous endpoint 'z)' must be an integer between 0 and 65536.z^[\w\.:-]+$z)The hostname of the rendezvous endpoint 'zN' must be a dot-separated list of labels, an IPv4 address, or an IPv6 address.éÿÿÿÿi   )r   ÚrsplitÚlenr&   r   r$   r%   )r(   r)   ÚhostÚrestÚports   &&   r   r   r   D   s  € ð ÒØ—>‘>Ó#ˆçØ˜\Ð*Ð*ð �…{�cÔ˜h r�l¨cÔ1Ø�m ‘mˆˆˆtà—o‘o c¨1Ó-ˆˆô ˆ4ƒy�1„}˜˜a� Cœ¨D°­H¸¬OØ�A�bˆzˆä
ˆ4ƒy�A„~Ü˜t A�wÓ'ˆØŠ<˜4 5œ=ÜØ>¸x¸jð I'ð 'óð ð )ð ˆä�8Š8�N D×)Ò)ÜØ7¸°zð B;ð ;ó
ð 	
ð
 ˆ:Ðr   c                ó0   € V ^8„  d   QhR\         R\        /# )r
   r3   r   )r   Úbool)r   s   "r   r   r   u   s   € ÷ 1ñ 1¤Cð 1¬Dñ 1r   c                ó*  € V R8X  d   R#  \         P                  ! V 4      pV'       d   VP                  '       d   R#  \        P
                  ! V R\        P                  \        P                  R7      pV Uu. uF  qD^,          ^ ,          NK  	  pp\        P                  ! 4       pW8X  d   R# \        P
                  ! VR\        P                  \        P                  R7      pV Fd  pV^,          '       d   V^,          V 8X  d    R# V'       d"   V^,          ^ ,          \        V4      8X  d    R# V^,          ^ ,          V9   g   Kc   R# 	  R#   \         d    Rp EL@i ; i  \        \        P                  3 d   p. p Rp?ELRp?ii ; iu upi )a(  Indicate whether ``host`` matches the hostname of this machine.

This function compares ``host`` to the hostname as well as to the IP
addresses of this machine. Note that it may return a false negative if this
machine has CNAME records beyond its FQDN or IP addresses assigned to
secondary NICs.
r,   TN)ÚprotoÚflagsF)Ú	ipaddressÚ
ip_addressr   Úis_loopbackÚsocketÚgetaddrinfoÚIPPROTO_TCPÚAI_CANONNAMEÚgaierrorÚgethostnamer   )	r3   ÚaddrÚhost_addr_listÚ_Úhost_addr_infoÚhost_ip_listÚ	this_hostÚ	addr_listÚ	addr_infos	   &        r   Ú_matches_machine_hostnamerL   u   sS  € ð ˆ{ÔÙðÜ×#Ò# DÓ)ˆ÷ �× × Ð ÙðÜ×+Ò+Ø�$œf×0Ñ0¼×8KÑ8Kô
ˆñ @NÓN¹~¨^ 1Õ% a×(Ð(¹~€LÐNä×"Ò"Ó$€IØÔÙä×"Ò"Ø�4œv×1Ñ1¼×9LÑ9Lô€Ió ˆ	à�Q�<Œ<˜I a�L¨DÔ0Ú÷ �I˜a•L •O¤s¨4£yÔ0Úð �Q�<˜�?˜lÖ*Úñ ñ øôI ô Ø‹ðûô œŸ™Ð(ô ØŽûðüò Os.   ‹E ¾6E% Á8FÅE"Å!E"Å%FÆ FÆFc                ó`   € V ^8„  d   QhR\         \        \         \         3,          ,          RR/# )r
   Úsecondsr   N)Úfloatr*   )r   s   "r   r   r   ©   s(   € ÷ ñ ”EœE¤%¬ ,Õ/Õ/ð °Dñ r   c                ó˜   € \        V \        4      '       d   \        P                  ! V !  p V R8¼  d   \        P
                  ! V 4       R# R# )zÃSuspend the current thread for ``seconds``.

Args:
    seconds:
        Either the delay, in seconds, or a tuple of a lower and an upper
        bound within which a random delay will be picked.
g{®Gáz„?N)Ú
isinstancer*   ÚrandomÚuniformÚtimeÚsleep)rN   s   &r   Ú_delayrV   ©   s7   € ô �'œ5×!Ò!Ü—.’. 'Ñ*ˆà�$„Ü�
Š
�7Öñ r   c                   óÔ   a € ] tR t^¸t o Rt ! R R4      tV 3R lR lt]V 3R lR l4       tV 3R lR	 lt	V 3R
 lR lt
V 3R lR lt]V 3R lR l4       t]R 4       tV 3R ltRtV tR# )Ú_PeriodicTimerz³Represent a timer that periodically runs a specified function.

Args:
    interval:
        The interval, in seconds, between each run.
    function:
        The function to run.
c                   ó,   a € ] tR t^Ät o V 3R ltRtV tR# )Ú_PeriodicTimer._Contextc                óŽ   <€ V ^8„  d   Qh/ S[ ;R&   S[R,          ;R&   S[S[R3,          ;R&   S[S[S[3,          ;R&   S[;R&   # )r
   Úinterval.ÚfunctionÚargsÚkwargsÚ
stop_event©.N)rO   r   r*   r   r   r   r   )r   Ú__classdict__s   "€r   r   Ú$_PeriodicTimer._Context.__annotate__Ä   sV   ø‡ ‚ Ù‰ñ á˜9Õ%Ñ%ñ ñ ‘C˜�H�oÑñ ñ ‘S™#�X•Ññ	 ñ
 Ñò r   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©rb   s   @r   Ú_ContextrZ   Ä   s   ø‡ ‡ „ r   rm   c          
      óD   <€ V ^8„  d   QhRS[ RS[R,          RS[RS[RR/# )r
   r\   r]   Nr^   r_   r   ra   )r   r   r   )r   rb   s   "€r   r   Ú_PeriodicTimer.__annotate__Ò   sB   ø€ ÷ ñ áðñ ˜9Õ%ðñ ð	ñ
 ðð 
ñr   c                óV  € R V n         V P                  4       V n        VP                  4       V P                  n        W P                  n        T;'       g    RV P                  n        T;'       g    / V P                  n        \        4       V P                  n	        R V n
        R V n        R # )Nrd   )Ú_namerm   Ú_ctxÚtotal_secondsr\   r]   r^   r_   r   r`   Ú_threadÚ
_finalizer)Úselfr\   r]   r^   r_   s   &&&*,r   Ú__init__Ú_PeriodicTimer.__init__Ò   sv   € ð ˆŒ
à—M‘M“OˆŒ	Ø%×3Ñ3Ó5ˆ�	‰	ÔØ%�	‰	ÔØŸ˜ ˆ�	‰	ŒØ!Ÿ<˜< Rˆ�	‰	ÔÜ$›wˆ�	‰	ÔàˆŒØˆŽr   c                ó.   <€ V ^8„  d   QhRS[ R,          /# ©r
   r   N©r   )r   rb   s   "€r   r   ro   æ   s   ø€ ÷ ñ ‘c˜D•jñ r   c                ó   € V P                   # )zGet the name of the timer.)rq   ©rv   s   &r   ÚnameÚ_PeriodicTimer.nameå   s   € ð �z‰zÐr   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r
   r~   r   Nr{   )r   rb   s   "€r   r   ro   ê   s   ø€ ÷ 	ñ 	™Sð 	 Tñ 	r   c                óL   € V P                   '       d   \        R4      hWn        R# )z�Set the name of the timer.

The specified name will be assigned to the background thread and serves
for debugging and troubleshooting purposes.
úThe timer has already started.N)rt   ÚRuntimeErrorrq   )rv   r~   s   &&r   Úset_nameÚ_PeriodicTimer.set_nameê   s   € ð �<�<ˆ<ÜÐ?Ó@Ð@àŽ
r   c                ó   <€ V ^8„  d   QhRR/# rz   rd   )r   rb   s   "€r   r   ro   õ   s   ø€ ÷ ñ �tñ r   c                óš  € V P                   '       d   \        R4      h\        V P                  V P                  ;'       g    RV P
                  3RR7      V n         \        P                  ! W P                  V P                   V P
                  P                  4      V n
        RV P                  n        V P                   P                  4        R# )zStart the timer.r‚   ÚPeriodicTimerT)Útargetr~   r^   ÚdaemonFN)rt   rƒ   r   Ú_runrq   rr   ÚweakrefÚfinalizeÚ_stop_threadr`   ru   ÚatexitÚstartr}   s   &r   r�   Ú_PeriodicTimer.startõ   s’   € à�<�<ˆ<ÜÐ?Ó@Ð@äØ—9‘9Ø—‘×.Ð.˜Ø—)‘)�Øô	
ˆŒô "×*Ò*Ø×#Ñ# T§\¡\°4·9±9×3GÑ3Gó
ˆŒð "'ˆ�‰Ôà�‰×ÑÖr   c                ó   <€ V ^8„  d   QhRR/# rz   rd   )r   rb   s   "€r   r   ro     s   ø€ ÷ ñ ˜ñ r   c                óN   € V P                   '       d   V P                  4        R# R# )z'Stop the timer at the next opportunity.N)ru   r}   s   &r   ÚcancelÚ_PeriodicTimer.cancel  s   € à�?�?ˆ?Ø�O‰OÖñ r   c                ó   <€ V ^8„  d   QhRR/# rz   rd   )r   rb   s   "€r   r   ro     s   ø€ ÷ 2ñ 2�Tñ 2r   c                ó¬   € V P                   P                  V P                  4      '       g)   V P                  ! V P                  / V P
                  B  KS  R # ©N)r`   Úwaitr\   r]   r^   r_   )Úctxs   &r   r‹   Ú_PeriodicTimer._run  s9   € à—.‘.×%Ñ% c§l¡l×3Ò3Ø�LŠL˜#Ÿ(™(Ð1 c§j¡jÔ1ñ 4r   c                óF   € VP                  4        V P                  4        R # r˜   )ÚsetÚjoin)Úthreadr`   s   &&r   rŽ   Ú_PeriodicTimer._stop_thread  s   € à�‰Ôà�‰Žr   c                óˆ   <€ V ^8„  d   Qh/ S[ R,          ;R&   S[R,          ;R&   S[P                  R,          ;R&   S[;R&   # )r
   Nrq   rt   ru   rr   )r   r   rŒ   r�   rm   )r   rb   s   "€r   r   ro   ¸   sK   ø‡ ‚ ñ& ��:Ññ' ñ( �d�]Ññ) ñ* × Ñ  4Õ'Ñ'ñ+ ñ0 �Nò1 r   )rr   ru   rq   rt   N)re   rf   rg   rh   Ú__doc__rm   rw   Úpropertyr~   r„   r�   r”   Ústaticmethodr‹   rŽ   ri   rj   rk   rl   s   @r   rX   rX   ¸   s€   ø‡ € ñ÷ñ ÷ð ð& ÷ó ð÷	ð 	÷ð ÷4ð ð
 ÷2ó ð2ð ñó ð÷E ƒ r   rX   )r;   rR   r$   r>   rT   rŒ   Úcollections.abcr   Údatetimer   Ú	threadingr   r   Útypingr   Ú__all__r   r&   r   rL   rV   rX   rd   r   r   Ú<module>rª      sW   ðó Û Û 	Û Û Û Ý $Ý ß #Ý ð 'Ð
'€õ#õLõ.õb1õh÷eó er   