+
    &j"(                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHt ] P                  R 4       t	RR/R lt
RRRR/R R	 lltR
 t ! R R4      tR tR# )    N)TracebackTypec               #   R  "    R x  R #   \          Ed   p T P                  p. pTEe   TP                  P                  P                  pTP                  P
                  P                  R4      pTR8X  Ed]   TEeX   \        P                  ! RRRR7      ;_uu_ 4       pTP                  T4       R R R 4       M  + '       g   i     M; iTP                  p\        RXP                  R4      pTP                  TP                  P                  R	7      p\        TP                  R
4      '       d<   TP                  TP                  P                  TP                  P                   R7      p\#        TTP
                  / TP$                  CR\&        P(                  /C4      p\+        R YP,                  TP.                  4      p	TP1                  T	4       MTP1                  T4       TP2                  pEK  R p
\5        T4       F  pYn        Tp
K  	  T P7                  T
4      hR p ? ii ; i5i)N__compile_source__z<string>wFz.py)modedeletesuffixz__inspect_currentframe()eval)co_nameco_linetable)r   co_firstlineno__inspect_currentframe)	Exception__traceback__tb_framef_codeco_filename	f_globalsgettempfileNamedTemporaryFilewritecompilenamereplacer   hasattrr   r   r
   f_localsinspectcurrentframer   tb_lasti	tb_linenoappendtb_nextreversedwith_traceback)exctbstackfilenamesourcefframecode
fake_framefake_tbr#   s              n/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/utils/_traceback.pyreport_compile_source_on_errorr1   0   s    P* N* n{{))55H[[**../CDF:%&*<2 00U5 GGFO    91666J||ELL,@,@|A5<<88  <<%*\\%>%>',||'B'B ( D "OOVu~~V'?AUAUV

 (j++r||TW%R B 5/B JG "   ))]N*s>   H'
 H'H$BHB7.	H7CEHH$$H'basec                  VfA   \         P                  P                  \         P                  P                  \        4      4      p \         P                  P	                  W.4      pV \        V4      ^,           R #   \         d    T u # i ; i)ziShorten a source filepath, with the assumption that torch/ subdirectories don't need to be shown to user.N)ospathdirname__file__
commonpathlen
ValueError)fnr2   prefixs   &$ r0   shorten_filenamer=      so    |wwrwwx89%##RJ/ #f+/#$$  	s    A; ;B
BlineFc                $    V ^8  d   QhR\         /# )   return)str)formats   "r0   __annotate__rD      s     	g 	gS 	g    c                   RpV'       d   V P                    R2pV \        V P                  VR7       RV P                   RV P                   2# )z
Format a FrameSummary in a short way, without printing full absolute path or code.

The idea is the result fits on a single line.
 z  # )r2   :z in )r>   r=   r)   linenor   )r,   r2   r>   
extra_lines   &$$ r0   format_framerK      sQ     J

|4(
\*5>>EFa~UYZ_ZdZdYeffrE   c                N    \        \        P                  ! V 4      R,          4      # )zJFormat a TracebackType in a short way, printing only the inner-most frame.)rK   	traceback
extract_tbr'   s   &r0   format_traceback_shortrQ      s    	,,R0455rE   c                      a  ] tR t^t o RR.tRV 3R lR lltV 3R lR ltR tR t]	R	R
RR
R^ /R l4       t
R t]	R 4       tRtV tR# )CapturedTracebackr'   skipc                   < V ^8  d   QhRR/# r@   rA   N )rC   __classdict__s   "r0   rD   CapturedTraceback.__annotate__   s      d rE   c                    Wn         W n        R # N)r'   rT   )selfr'   rT   s   &&&r0   __init__CapturedTraceback.__init__   s    	rE   c                   < V ^8  d   QhRR/# rV   rW   )rC   rX   s   "r0   rD   rY      s       rE   c                    R V n         R # r[   rP   r\   s   &r0   cleanupCapturedTraceback.cleanup   s	    rE   c                    ^ RI pV P                  f   \        P                  ! 4       # \	        VP
                  P                  P                  V P                  .4      ^ ,          V P                  4      # )r   N)	torch._C._profilerr'   rN   StackSummary_extract_symbolized_tb_C	_profilersymbolize_tracebacksrT   )r\   torchs   & r0   summaryCapturedTraceback.summary   sS    !77?))++%HH33TWWI>qA499
 	
rE   c                &    R RR RV P                   /3# )Nr'   rT   )rT   ra   s   &r0   __getstate__CapturedTraceback.__getstate__   s"    d		
 	
rE   scriptFcppc                    ^ RI pV '       g	   V'       d   V^ 8w  d   \        R4      h\        VP                  P                  P                  RWR7      V '       g	   V'       d   ^ 4      # V^,           4      # )a  
Like traceback.extract_stack(), but faster (approximately 20x faster); it
is fast enough that you can unconditionally log stacks this way as part of
normal execution.  It returns a torch._C._profiler.CapturedTraceback
object that must be formatted specially with format_captured_tb.

By default, this only reports Python backtraces (like extract_stack).  You
can set the script/cpp kwargs to also turn on TorchScript/C++ trace
reporting.
Nzskip with script/cpp NYIT)pythonrq   rr   )re   AssertionErrorrS   rh   ri   gather_traceback)rq   rr   rT   rk   s   $$$ r0   extractCapturedTraceback.extract   se     	"Sqy$%?@@ HH//tF/T 3A	
 	
 %)1H	
 	
rE   c                J    \         P                  ! V P                  4       4      # )a<  
Formats a single torch._C._profiler.CapturedTraceback into a list of
strings equivalent to the output of traceback.format_list.  Note that if
pass it CapturedTraceback with C++ traces,  it is better not to use this
function and use the batch formatting API format_captured_tbs to amortize
the cost of symbolization
)rN   format_listrl   ra   s   &r0   rC   CapturedTraceback.format   s     $$T\\^44rE   c                   ^ RI p. p. p\        V 4       FH  w  rEVP                  f   VP                  . 4       K&  VP                  R4       VP                  V4       KJ  	  VP                  P
                  P                  V Uu. uF  q@V,          P                  NK  	  up4       V F/  p\        P                  ! W,          P                  4       4      W$&   K1  	  V# u upi )zO
Bulk version of CapturedTraceback.format.  Returns a list of list of strings.
N)
re   	enumerater'   r"   rh   ri   rj   rN   rz   rl   )tbsrk   rsdelayed_idxsir'   s   &     r0   
format_allCapturedTraceback.format_all   s    
 	" &(s^EAuu}		"		$##A& $ 	//L0QLqQL0QRA))#&..*:;BE  		 1Rs   C)rT   r'   N)r   )__name__
__module____qualname____firstlineno__	__slots__r]   rb   rl   ro   staticmethodrw   rC   r   __static_attributes____classdictcell__)rX   s   @r0   rS   rS      sn     vI  	

 
% 
U 
 
 
05  rE   rS   c           	         \         P                  ! 4       p\        WR 4       F?  pVP                  \         P                  ! VR,          VR,          VR,          4      4       KA  	  V# )z|
Given a symbolized traceback from symbolize_tracebacks, return a StackSummary object of
pre-processed stack trace entries.
Nr)   r>   r   )rN   rf   r$   r"   FrameSummary)r'   rT   r(   r+   s   &&  r0   rg   rg      sQ    
 ""$Ebi Y++AjM1V9aiPQ !LrE   )
contextlibr   os.pathr4   r   rN   typesr   contextmanagerr1   r=   rK   rQ   rS   rg   rW   rE   r0   <module>r      sn         R Q* Q*h
% 
%	g 	g5 	g6
V VrrE   