+
    –°³j˜  ã                   óâ   a € R t0 t ^ RIt^ RIt^ RIt^ RIHtHt ^ RIt^ RI	H
t
 ^ RIHtHt ]'       d   ^ RIHt RR.t]P"                  ! ]4      t] ^ k Rs] ^k Rs] ^k RR R	 lltR
 R ltR# )é    N)ÚLiteralÚTYPE_CHECKING)Ú_WorkerServer)Úget_rankÚtcpstore_client)ÚDebugHandlerÚstart_debug_serverÚstop_debug_serverc                óæ   € V ^8„  d   QhR\         R\         R\        R,          R,          R\        R,          R\        R\        \        ,          R,          R\
        R	,          R,          R
\        RR/	# )é   ÚportÚworker_portÚstart_methodNÚdump_dirÚdump_intervalÚenabled_dumpsÚhandlersr   Úfetch_timeoutÚreturn)ÚforkÚspawnÚ
forkserver)Úintr   ÚstrÚfloatÚsetÚlist)Úformats   "Úa/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/distributed/debug/__init__.pyÚ__annotate__r       sŽ   € ÷ d#ñ d#Ü
ðd#äðd#ô Ð7Õ8¸4Õ?ðd#ô �D�jð	d#ô
 ðd#ô ”s•8˜d•?ðd#ô �>Õ" TÕ)ðd#ô ðd#ð 
ñd#ó    c                óV  € \         e   \        R4      h\        e   \        R4      h\        P	                  RV 4       \        4       p\        RV4      s \        4       p	VP                  RV	 2R\        P                  ! 4        R\         P                   24       V	^ 8X  dŠ   ^ RIHp
 ^ R	IHp Vf   V
! 4       pVf   0 RmpR
V RVRVRVRVRV/pVe+   \         P"                  ! V4      pVP%                  W¼RR7      sM\         P$                  ! W¼RR7      s\        P'                  4        R# R# )aù  
Start the debug server stack on all workers. The frontend debug server is
only started on rank0 while the per rank worker servers are started on all
ranks.

This server provides an HTTP frontend that allows for debugging slow and
deadlocked distributed jobs across all ranks simultaneously. This collects
data such as stack traces, FlightRecorder events, and performance profiles.

This depends on dependencies which are not installed by default.

Dependencies:
- Jinja2
- aiohttp

WARNING: This is intended to only be used in trusted network environments.
The debug server is not designed to be secure and should not be exposed to
the public internet. See SECURITY.md for more details.

WARNING: This is an experimental feature and may change at any time.

Args:
    port (int): The port to start the frontend debug server on.
    worker_port (int): The port to start the worker server on. Defaults to 0, which
        will cause the worker server to bind to an ephemeral port.
    start_method (str | None): The multiprocessing start method to use for the
        frontend server process. One of "fork", "spawn", or "forkserver".
        If None, uses the default start method. Using "spawn" is recommended
        when using CUDA or when fork safety is a concern.
    dump_dir (str | None): Directory to write periodic debug dumps to. If None,
        periodic dumping is disabled.
    dump_interval (float): Seconds between periodic dumps. Defaults to 60.
    enabled_dumps (set[str] | None): Set of handler dump filenames to enable
        (e.g. {"stacks", "fr_trace", "tcpstore"}). If None, all handlers that
        implement dump() are enabled.
    handlers (list[DebugHandler] | None): List of debug handlers to use. If None,
        uses the default handlers. See torch.distributed.debug._handlers for
        the default handlers.
    fetch_timeout (float): Timeout in seconds for fetching data from individual
        workers. Defaults to 60. Workers that don't respond within this time
        will be reported as unavailable.
Nzdebug server already startedz Starting debug server on port %dz::Úrankzhttp://Ú:)Údefault_handlers)Úmainr   r   r   r   r   r   T)ÚtargetÚkwargsÚdaemon>   ÚstacksÚfr_traceÚtorchcomms_health_check)Ú_WORKER_SERVERÚAssertionErrorÚ_DEBUG_SERVER_PROCÚloggerÚinfor   r   r   r   ÚsocketÚgethostnamer   Ú'torch.distributed.debug._debug_handlersr%   Ú!torch.distributed.debug._frontendr&   ÚmultiprocessingÚget_contextÚProcessÚstart)r   r   r   r   r   r   r   r   ÚstoreÚRANKr%   r&   Úmain_kwargsÚctxs   &&&&&&&&      r   r	   r	      s1  € ôl Ò!ÜÐ;Ó<Ð<ÜÒ%ÜÐ;Ó<Ð<ä
‡K�KÐ2°DÔ9äÓ€Eä" 4¨Ó5€Nä‹:€DØ	‡I�I��T�Fˆm˜w¤v×'9Ò'9Ó';Ð&<¸A¼n×>QÑ>QÐ=RÐSÔTàˆq„yÝLÝ:àÒÙ'Ó)ˆHØÒ òˆMð �DØ˜Ø˜]Ø˜]Ø˜Ø˜]ð
ˆð Ò#Ü!×-Ò-¨lÓ;ˆCà!$§¡Ø¸ð "-ó "Ñô "1×!8Ò!8Ø¸ô"Ðô 	× Ñ Ö"ñA r!   c                ó   € V ^8„  d   QhRR/# )r   r   N© )r   s   "r   r    r    ‚   s   € ÷ ñ ˜4ñ r!   c                 óè   € \         f   \        h\        f   \        h\        P	                  R4       \         P                  4        \        P                  4        \         P                  4        RsRs R# )zG
Shutdown the debug server and stop the frontend debug server process.
NzStopping debug server)r/   r.   r-   r0   r1   Ú	terminateÚshutdownÚjoinr?   r!   r   r
   r
   ‚   sX   € ô Ò!ÜÐÜÒÜÐä
‡K�KÐ'Ô(ä× Ñ Ô"Ü×ÑÔÜ×ÑÔà€NØÒr!   c                óÔ   € V ^8„  d   Qh/ ^ \         9   d   \        P                  ;R&   ^\         9   d   \        R,          ;R&   ^\         9   d   \        P
                  R,          ;R&   # )r   r0   Nr-   r/   )Ú__conditional_annotations__ÚloggingÚLoggerr   r6   r8   )r   s   "r   r    r       sP   € ‡�÷( 5Ò 4Œ�‰Ñ 4ñ) ÷, ,Ò +” Õ$Ñ +ñ- ÷. :Ò 9”O×+Ñ+¨dÕ2Ñ 9ò/ r!   )i�e  r   NNç      N@NNrH   )rE   rF   r6   r2   Útypingr   r   Ú!torch.distributed.debug._handlersÚtorchÚtorch._C._distributed_c10dr   Útorch.distributed.debug._storer   r   r5   r   Ú__all__Ú	getLoggerÚ__name__r0   r-   r/   r	   r
   r    )rE   s   @r   Ú<module>rQ      sh   øðß €Û Û ß )ó )Ý 4ß D÷ Ý>ð Øð€ð
 !×*Ò*¨8Ó4€Ó 4à'+€Ó +Ø59Ð Ó 9÷d#÷Nr!   