+
    –°³j—  ã                   óš   € ^ RI t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht . ROt]	! ]4      tRtRtRtRR R	 lltR
 tR tR R ltR# )é    N)Úclosing)Ú
get_logger)Úbarrierzaddress already in usezSocket Timeoutz_tcp_store/num_membersc                óz   € V ^8„  d   QhR\         R\        R\        R\        R\        R\         R\         R,          /# )	é   Ú	is_serverÚserver_addrÚserver_portÚ
world_sizeÚtimeoutÚwait_for_workersÚ	use_libuvN)ÚboolÚstrÚintÚfloat)Úformats   "Úl/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/distributed/elastic/utils/distributed.pyÚ__annotate__r      s[   € ÷ Pñ PÜðPäðPô ðPô ð	Pô
 ðPô ðPô �d�{ñPó    c           
      ó<  € Ve   \         P                  R4       \        P                  P	                  RR4      R8H  pVR8X  d   V^8”  d   \        RV RV 24      hVR8w  d   \         P                  RV4       VR8X  d   TM^p VR8w  d   Tp	M
\        4       p	\         P                  RVV	VV VV4        \        P                  ! VV	VV \        P                  ! VR7      VVR	7      p
V'       d   \        W£VR
7       \         P                  R4       V
#   \        P                   dt   p\        \        T4      P!                  4       9   dL   Y†8  d(   \         P                  RT	TT4       T^,          p R p?Kó  \        P                  ! RT RT	 R24      Thh R p?ii ; i)Nz¸argument use_libuv is deprecated and ignored. Set USE_LIBUV environment variable to "0" to disable libuv, or "1" to enable it. If the env var is not set, libuv will be used by default.Ú	USE_LIBUVÚ1zCserver_port must be specified when world_size > 1, got server_port=z, world_size=z+sever_port: %s, specified, ignoring retriesziCreating c10d store on %s:%s
  world_size  : %s
  is_server   : %s
  timeout(sec): %s
  use_libuv   : %s
)Úseconds)Ú	host_nameÚportr   Ú	is_masterr   r   r   )r   zSuccessfully created c10d storez)port: %s already in use, attempt: [%s/%s]zon z, port: z already in useéÿÿÿÿ)ÚloggerÚwarningÚosÚenvironÚgetÚ
ValueErrorÚinfoÚget_free_portÚdistÚTCPStoreÚdatetimeÚ	timedeltaÚ_check_full_rankÚDistNetworkErrorÚ_ADDRESS_IN_USEr   Úlower)r   r	   r
   r   r   r   Úretriesr   Úattemptr   ÚstoreÚes   &&&&&&&&    r   Úcreate_c10d_storer3      s�  € ð ÒÜ�‰ð9ô	
ô —
‘
—‘˜{¨CÓ0°CÑ7€Ià�bÔ˜Z¨!œ^ÜØQÐR]ÐQ^Ð^kÐlvÐkwÐxó
ð 	
ð �bÔÜ�‰ÐAÀ;ÔOð %¨Ô*‰g°€GØ
Ø˜"ÔØ‰Dä “?ˆDä�‰ð#ð
 ØØØØØô	
ð	Ü—M’MØ%ØØ%Ø#Ü ×*Ò*°7Ô;Ø!1Ø#ôˆE÷  Ü  ¸GÕDÜ�K‰KÐ9Ô:ØˆLøÜ×$Ñ$ô 	Ü¤# a£&§,¡,£.Ô0ØÔ$Ü—N‘NØCØØØô	ð ˜q•L–Gä×/Ò/Ø˜k˜]¨(°4°&¸ÐHóàðð ûð	ús%   Â59D Ã/#D ÄFÄ(A	FÅ7FÆFc                 óœ   €  \        W\        VR 7       R#   \         d+   p\        T4      \        8X  d   \        RT R24      Thh Rp?ii ; i))Ú
key_prefixÚbarrier_timeoutztimed out waiting for all z members to joinN)r   Ú_TCP_STORE_INITÚRuntimeErrorr   Ú_SOCKET_TIMEOUTÚTimeoutError)r1   r   r   r2   s   &&& r   r+   r+   p   sQ   € ðÜ�¬oÈw×WøÜô Üˆq‹6”_Ô$ÜØ,¨Z¨LÐ8HÐIóàðð ûðús   ‚ –A¡%AÁAc                 ó¨   € \        4       p \        V 4      ;_uu_ 4        V P                  4       ^,          uuRRR4       #   + '       g   i     R# ; i)a«  
Returns an unused port on localhost.

This function finds an unused port on localhost by opening to socket to bind
to a port and then closing it.

Returns:
    int: an unused port on localhost

Example:
    >>> # xdoctest: +SKIP("Nondeterministic")
    >>> get_free_port()
    63976

.. note::
    The port returned by :func:`get_free_port` is not reserved and may be
    taken by another process after this function returns.
N)Úget_socket_with_portr   Úgetsockname)Úsocks    r   r&   r&   |   s2   € ô&  Ó!€DÜ	���Ø×ÑÓ! !Õ$÷ 
��‹ús   žA Á A	c                ó8   € V ^8„  d   QhR\         P                   /# )r   Úreturn)Úsocket)r   s   "r   r   r   ”   s   € ÷ 4ñ 4œfŸm™mñ 4r   c                 óœ  € \         P                  ! RR\         P                  \         P                  R7      p V  FF  pVw  r#p p\         P                   ! W#V4      p VP	                  R4       VP                  ^ 4       Vu # 	  \        R4      h  \         d3   pTP                  4        \        P                  RTR7        Rp?K�  Rp?ii ; i)a”  
Returns a free port on localhost that is "reserved" by binding a temporary
socket on it. Close the socket before passing the port to the entity
that requires it. Usage example

::

sock = _get_socket_with_port()
with closing(sock):
    port = sock.getsockname()[1]
    sock.close()
    # there is still a race-condition that some other process
    # may grab this port before func() runs
    func(port)
Ú	localhostN)Úhostr   ÚfamilyÚtypezSocket creation attempt failed.)Úexc_infozFailed to create a socket)rC   r   )rA   ÚgetaddrinfoÚ	AF_UNSPECÚSOCK_STREAMÚbindÚlistenÚOSErrorÚcloser   r    r8   )ÚaddrsÚaddrrE   rF   ÚprotoÚ_Úsr2   s           r   r<   r<   ”   sµ   € ô" ×ÒØ˜t¬F×,<Ñ,<Ä6×CUÑCUô€Eó ˆØ$(Ñ!ˆ�e˜Q Ü�MŠM˜&¨Ó.ˆð	JØ�F‰FÐ#Ô$Ø�H‰H�QŒKØŠHñ ô Ð2Ó
3Ð3øô ô 	JØ�G‰GŒIÜ�N‰NÐ<ÀqˆN×IÒIûð	Jús   Á#BÂCÂ'CÃC)r3   r&   r<   )r   é   iX  Té   N)r)   r!   rA   Ú
contextlibr   Útorch.distributedÚdistributedr'   Ú'torch.distributed.elastic.utils.loggingr   Ú%torch.distributed.elastic.utils.storer   Ú__all__Ú__name__r   r-   r9   r7   r3   r+   r&   r<   © r   r   Ú<module>r^      sS   ðó Û 	Û Ý å  Ý >Ý 9ò I€á	�HÓ	€à*€Ø"€à*€÷Pòf	ò%÷04r   