
    #hi                       d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z
d dlZd dlmZmZ d dlmZ d dlmZmZmZmZmZmZmZmZmZmZmZ d dlZd dlmZ d dl m!Z! d dl"m#Z#  ej$        e%          Z&erd dl'Z'	  G d	 d
e          Z( G d de          Z) G d dej*                  Z+	  G d d          Z, G d de          Z-ej.         G d d                      Z/ ed          Z0	 ej.         G d d                      Z1	 ej.         G d de1                      Z2	  G d deee0                   Z3	  G d d          Z4 G d d          Z5 G d  d!e3e5                   Z6 G d" d#          Z7 G d$ d%e3e7                   Z8	  G d& d'          Z9 G d( d)e3e4                   Z: ej;                    Z<	  G d* d+          Z= G d, d-          Z>ed;d/            Z?ed<d1            Z@ ej.        d23           G d4 d5                      ZA ej.        d23           G d6 d7eA                      ZBd=d>d:ZCdS )?    )annotationsN)ABCabstractmethod)contextmanager)AnyCallableDictGenericList
NamedTupleOptionalSetTupleTYPE_CHECKINGTypeVar)_pytree)CapturedTraceback)WeakTensorKeyDictionaryc                  *    e Zd ZU ded<   ded<   d ZdS )	CompileIdintframe_idframe_compile_idc                $    | j          d| j         S )N/)r   r   selfs    M/var/www/html/auto_sub_bot/venv/lib/python3.11/site-packages/torch/_guards.py__str__zCompileId.__str__>   s    -99$"7999    N__name__
__module____qualname____annotations__r    r    r   r   r   5   s<         MMM
 : : : : :r    r   c                  *    e Zd ZU ded<   ded<   d ZdS )TraceIdr   
compile_idr   attemptc                b    | j         dk    rt          | j                  S | j         d| j          S )Nr   _)r*   strr)   r   s    r   r   zTraceId.__str__H   s7    <1t'''o66666r    Nr!   r&   r    r   r(   r(   B   s<          LLL7 7 7 7 7r    r(   c                  H    e Zd ZdZdZdZdZdZdZdZ	dZ
d	ZddZddZd ZdS )GuardSourcer                           returnboolc                6    | t           j        t           j        fv S N)r/   GLOBAL_FSDP_MODULELOCAL_FSDP_MODULEr   s    r   is_fsdp_modulezGuardSource.is_fsdp_moduleZ   s    68UVVVr    c                ^    | t           j        t           j        fv p|                                 S r;   )r/   GLOBAL_NN_MODULELOCAL_NN_MODULEr>   r   s    r   is_nn_modulezGuardSource.is_nn_module]   s6    ,+ %
 ""$$	
r    c                L    | t           j        t           j        t           j        fv S r;   )r/   LOCALrA   r=   r   s    r   is_localzGuardSource.is_localg   s&    ')
 
 	
r    Nr8   r9   )r"   r#   r$   rD   GLOBALrA   r@   CONSTANTRANDOM_VALUE	SHAPE_ENVr=   r<   r>   rB   rE   r&   r    r   r/   r/   O   s        EFOHLIW W W W
 
 
 

 
 
 
 
r    r/   c                      e Zd ZdS )GuardBuilderBaseNr"   r#   r$   r&   r    r   rL   rL   }   s        Dr    rL   c                  $    e Zd ZU ded<   ded<   dS )
ShapeGuardz
sympy.Exprexprr   stackNr"   r#   r$   r%   r&   r    r   rO   rO      s*         r    rO   c                      e Zd ZU ded<   ded<   dZded<   dZded<   dZd	ed
<   dZded<   dZdZ	dZ
d Zd Zd Zd Zed d            Zed!d            Zed             Zd Zd Zd"dZd Zd Zd Zd ZdS )#GuardSourceoriginating_sourcez)Callable[[GuardBuilderBase, Guard], None]	create_fnNzOptional[List[str]]guard_types	code_listzOptional[object]obj_weakrefzOptional[type]guarded_class_weakrefc                    | j         3t          | j        | j        t	          | j                  f          | _         | j         S r;   )_hashhashnamesourceidrW   r   s    r   __hash__zGuard.__hash__   s6    :ty$+r$.7I7IJKKDJzr    c                    | j         r| j         j        ndt          | j                  | j        |                                 j        j        fS )N)r`   valuelenr_   inner_create_fn__code__co_firstlinenor   s    r   sort_keyzGuard.sort_key   sE    !%4DK"	NNI  ""+:	
 	
r    c                V    |                                  |                                 k     S r;   )rj   r   others     r   __lt__zGuard.__lt__   s    }}!1!111r    c                f    t          | j        t          j                  r| j        j        S | j        S r;   )
isinstancerW   	functoolspartialfuncr   s    r   rg   zGuard.inner_create_fn   s,    dni&788 	">&&>!r    r8   r-   c                4    | j                                         S r;   )rV   r_   r   s    r   r_   z
Guard.name   s    &++---r    r/   c                4    | j                                         S r;   )rV   guard_sourcer   s    r   r`   zGuard.source   s    &33555r    c           
     @   t          | t          j                  rv |             }|Jdt          t	          |                      d|j        j         dt          t	          |                     dS dt          t	          |                      dS t          |           S )a  
        This is a workaround of a Python weakref bug.

        `obj_weakref` is instance returned by `weakref.ref`,
        `str(obj_weakref)` is buggy if the original obj overrides __getattr__, e.g:

            class MyConfig(dict):
                def __getattr__(self, x):
                    return self[x]

            obj = MyConfig(offset=5)
            obj_weakref = weakref.ref(obj)
            str(obj_weakref)  # raise error: KeyError: '__name__'
        Nz<weakref at z; to 'z' at >z; dead>)rp   weakrefReferenceTypehexra   	__class__r"   r-   )rZ   objs     r   weakref_to_strzGuard.weakref_to_str   s      k7#899 	$+--Cnc"[//&:&:nn#-BXnn_bceficjcj_k_knnnnCc"[//&:&:CCCC{###r    c                    d| j         r| j         j                                        nd dt          | j                   d|                                 j         d| j         d| j         d|                     | j	                   d| j
         d}|S )	Nz	
          z&
        {
            'guard_types': z,
            'code': z,
            'obj_weakref': z
            'guarded_class': z
        }
        )r`   r_   lowerreprrg   r"   rX   rY   r~   rZ   r[   )r   ss     r   __repr__zGuard.__repr__   s    %)[	8				!	!	!b ;?	?? MQMaMaMcMcMl  !,  ^	 
 !//0@AA  #8   r    c                l   dt          | j                   d}| j        r| j        j                                        nd}|d| dz  }|d|                                 j         dz  }|d| j         dz  }|d| j         dz  }|d|                     | j	                   dz  }|d	| j
         dz  }|S )
NzName: 
r   z    Source: z    Create Function: z    Guard Types: z    Code List: z    Object Weakref: z    Guarded Class Weakref: )r   r_   r`   r   rg   r"   rX   rY   r~   rZ   r[   )r   outputr`   s      r   r   zGuard.__str__   s    -$ty//----1[@!'')))b+++++M$*>*>*@*@*IMMMM:d&6::::6DN6666R)<)<T=M)N)NRRRRN0JNNNNr    builderrL   c           	        	 |                      ||           S # t          $ r t                              dt	          |                                                      | j        r_t                              dd                    | j                                        dd                                                                w xY w)NzError while creating guard:
%szCreated at:
%sr   )	rW   	Exceptionlogerrorr-   rstriprQ   joinformat)r   r   s     r   createzGuard.create   s    	>>'4000 	 	 	II7T9I9I9K9KLLLz Y		+RWWTZ5F5F5H5H5M-N-N-U-U-W-WXXX		s
    B,Cc                4    | j                                         S r;   )r`   rB   r   s    r   rB   zGuard.is_nn_module   s    {'')))r    c                4    | j                                         S r;   )r`   r>   r   s    r   r>   zGuard.is_fsdp_module   s    {))+++r    c                4    | j                                         S r;   )r`   rE   r   s    r   rE   zGuard.is_local  s    {##%%%r    c                0   | j         st                      | _         | j                             |           | j        |d fv s
J d            || _        | j        s|| _        n| j                            |           | j        |d fv s
J d            || _        d S )Nz+Guarded class id must be identical, or Nonez)Guarded object must be identical, or None)rX   listappendr[   rY   extendrZ   )r   
guard_typeguarded_classrY   rZ   s        r   set_export_infozGuard.set_export_info  s     	&#vvD
+++).
 
 
 
 9
 
 
 &3"~ 	-&DNNN!!),,,$
 
 
 
 7
 
 
 'r    r8   r-   r8   r/   )r   rL   )r"   r#   r$   r%   rX   rY   rZ   r[   rQ   
user_stackr]   rb   rj   rn   rg   propertyr_   r`   staticmethodr~   r   r   r   rB   r>   rE   r   r&   r    r   rT   rT      s        & 8888 (,K++++%)I))))$(K((((,00000EJE  

 
 
2 2 2" " " . . . X. 6 6 6 X6 $ $ \$0
 
 
	 	 	   * * *, , ,& & &' ' ' ' 'r    rT   Tc                      e Zd ZdS )GuardEnvExprNrM   r&   r    r   r   r   (  s        Dr    r   c                  *    e Zd ZU ded<   ded<   d ZdS )DuplicateInputsrU   input_source_ainput_source_bc                *    | j         | j        k    sJ d S r;   )r   r   r   s    r   __post_init__zDuplicateInputs.__post_init__8  s    "d&9999999r    N)r"   r#   r$   r%   r   r&   r    r   r   r   3  s=         : : : : :r    r   c                  >    e Zd Zedd            Zedd            ZdS )	Checkpointabler8   r   c                    d S r;   r&   r   s    r   copy_graphstatezCheckpointable.copy_graphstateJ      r    statec                    d S r;   r&   r   r   s     r   restore_graphstatez!Checkpointable.restore_graphstateN  r   r    N)r8   r   )r   r   )r"   r#   r$   r   r   r   r&   r    r   r   r   I  sR           ^    ^  r    r   c                  B    e Zd ZU  e            Zded<   d Z	 d Zd ZdS )GuardsCheckpointState
Set[Guard]dynamo_guardsc                    || _         d S r;   )r   )r   r   s     r   __init__zGuardsCheckpointState.__init__[  s    *r    c                n    | j                             |j                   }t          |          dk    rd S |S Nr   )r   
differencerf   r   rm   rs      r   diffzGuardsCheckpointState.diffe  s4    ))%*=>>q66Q;;4r    c                0    |                      |          d u S r;   r   rl   s     r   __eq__zGuardsCheckpointState.__eq__k      yy4''r    N)	r"   r#   r$   setr   r%   r   r   r   r&   r    r   r   r   X  s_          #M%%%%+ + +  ( ( ( ( (r    r   c                  2    e Zd ZU i Zded<   d Z	 d Zd ZdS )ModuleContextCheckpointStatezDict[str, torch.nn.Module]
nn_modulesc                    || _         d S r;   r   )r   r   s     r   r   z%ModuleContextCheckpointState.__init__r  s    $r    c                    t          | j                                                                      t          |j                                                            }t	          |          dk    rd S |S r   )r   r   keysr   rf   r   s      r   r   z!ModuleContextCheckpointState.diff|  s[    $$&&''223u7G7L7L7N7N3O3OPPq66Q;;4r    c                0    |                      |          d u S r;   r   rl   s     r   r   z#ModuleContextCheckpointState.__eq__  r   r    N)r"   r#   r$   r   r%   r   r   r   r&   r    r   r   r   o  sY         -/J////% % %  ( ( ( ( (r    r   c                       e Zd Zd Zd Zd ZdS )ModuleContextc                    i | _         d S r;   r   r   s    r   r   zModuleContext.__init__  s    *,r    c                D    t          t          | j                            S r;   )r   dictr   r   s    r   r   zModuleContext.copy_graphstate  s    +D,A,ABBBr    c                L    t          |t                    sJ |j        | _        d S r;   )rp   r   r   r   s     r   r   z ModuleContext.restore_graphstate  s'    %!=>>>>>*r    Nr"   r#   r$   r   r   r   r&   r    r   r   r     sD        - - -C C C+ + + + +r    r   c                  2    e Zd ZU i Zded<   d Z	 d Zd ZdS )GlobalContextCheckpointStatezDict[str, Tuple[Callable, ...]]global_statec                    || _         d S r;   r   )r   global_statess     r   r   z%GlobalContextCheckpointState.__init__  s    )r    c                    t          | j                                                                      t          |j                                                            }t	          |          dk    rd S |S r   )r   r   r   r   rf   r   s      r   r   z!GlobalContextCheckpointState.diff  s\    !&&(())44S9K9P9P9R9R5S5STTq66Q;;4r    c                0    |                      |          d u S r;   r   rl   s     r   r   z#GlobalContextCheckpointState.__eq__  r   r    N)r"   r#   r$   r   r%   r   r   r   r&   r    r   r   r     sY         46L6666* * *  ( ( ( ( (r    r   c                  ,    e Zd ZdZh dZd Zd Zd ZdS )GlobalContextzz
    This keeps track of the global torch state during tracing of a function.
    For example, torch.is_grad_enabled.
    >   grad_enabledautocast_enabledautocast_cpu_dtypeautocast_gpu_dtypeautocast_cpu_enabledautocast_cache_enabledtorch_function_enabledc                    i | _         d S r;   r   r   s    r   r   zGlobalContext.__init__  s    =?r    c                D    t          t          | j                            S r;   )r   r   r   r   s    r   r   zGlobalContext.copy_graphstate  s    +D1B,C,CDDDr    c                f   t          |t                    sJ |j        | _        t          | j                  t          | j                  k    r/t          | j                                                  | j        k    s
J d            | j                                        D ]\  }} ||           d S )NzGlobal state mismatch)rp   r   r   rf   _supported_global_statesr   r   values)r   r   rs   argss       r   r   z GlobalContext.restore_graphstate  s    %!=>>>>>!.!""c$*G&H&HHHD%**,,--1NNNN" ONO +2244 	 	JD$DJJJJ	 	r    N)r"   r#   r$   __doc__r   r   r   r   r&   r    r   r   r     sc         
     @ @ @E E E    r    r   c                  D    e Zd ZddZd Zd Zd Zd ZddddZddZ	dS )	GuardsSetNc                4    |t                      }|| _        d S r;   )r   inner)r   r   s     r   r   zGuardsSet.__init__  s    =EEE


r    c                *    t          | j                  S r;   )iterr   r   s    r   __iter__zGuardsSet.__iter__      DJr    c                *    t          | j                  S r;   )rf   r   r   s    r   __len__zGuardsSet.__len__  s    4:r    c                :    t          | j        |j        z
            S r;   )r   r   rl   s     r   __sub__zGuardsSet.__sub__  s    ek1222r    c                *    t          | j                  S r;   )r9   r   r   s    r   __bool__zGuardsSet.__bool__  r   r    r   skipguardrT   c                   || j         v rd S |j        t          j        d|z             |_        |j        t
                                          |_        | j                             |           d S Nr0   r   )r   rQ   r   extractr   TracingContextextract_stackadd)r   r   r   s      r   r  zGuardsSet.add  sl    DJF;+3TBBBEK#-;;==E
ur    othersr   c                H    |D ]}|D ]}|                      |d           d S r   )r  )r   r  ogs       r   updatezGuardsSet.update  sH     	$ 	$A $ $####$	$ 	$r    r;   )r   rT   )r  r   )
r"   r#   r$   r   r   r   r   r   r  r  r&   r    r   r   r     s           
       
3 3 3      )*      $ $ $ $ $ $r    r   c                       e Zd Zd Zd Zd ZdS )GuardsContextc                :    t                      | _        g | _        d S r;   )r   r   aotautograd_guardsr   s    r   r   zGuardsContext.__init__  s    (168r    c                N    t          t          | j        j                            S r;   )r   r   r   r   r   s    r   r   zGuardsContext.copy_graphstate  s    $S);)A%B%BCCCr    c                f    t          |t                    sJ t          |j                  | _        d S r;   )rp   r   r   r   r   s     r   r   z GuardsContext.restore_graphstate  s2    %!677777&u':;;r    Nr   r&   r    r   r	  r	    sD        9 9 9D D D< < < < <r    r	  c                  p    e Zd Zed	d            Zed
d            Zd Zed             Zed             ZdS )CompileContextr8   c                 6    t           j        J t           j        S r;   )_TLScompile_contextr&   r    r   getzCompileContext.get  s    #///##r    Optional[CompileContext]c                 .    t          t          dd           S Nr  getattrr  r&   r    r   try_getzCompileContext.try_get       t.555r    c                T    |t          |t                    sJ || _        d| _        d S r   )rp   r   r)   r*   )r   r)   s     r   r   zCompileContext.__init__$  s/    !Z
I%F%F!!F/9r    c                 J    t                                           } | d S | j        S r;   )r  r  r)   r   s    r   current_compile_idz!CompileContext.current_compile_id)  s%    %%''<4r    c                     t                                           } | d S | j        d S t          | j        | j                  S r;   )r  r  r)   r(   r*   r   s    r   current_trace_idzCompileContext.current_trace_id0  s>    %%''<4?"4t555r    N)r8   r  )r8   r  )	r"   r#   r$   r   r  r  r   r  r  r&   r    r   r  r    s        $ $ $ \$ 6 6 6 \6  
   \ 6 6 \6 6 6r    r  c                  *   e Zd ZdZedd            Zedd            Zd Zeed                         Z	ed             Z
eej        d	                         Zeej        d
                         Zeej        d                         Zed             ZdS )r   z
    Provides the currently installed TracingContext, or None.

    Note that it is a staticmethod, and invocations outside of `with tracing()` (see below), are valid but
    will return None.
    r8   Optional[TracingContext]c                 .    t          t          dd           S )Ntracing_contextr  r&   r    r   r  zTracingContext.try_getB  r  r    c                 Z    t                                           x} r| S t          d          )Nz<TracingContext.get() must be called within an ongoing trace.)r   r  RuntimeError)ctxs    r   r  zTracingContext.getF  s5     ((***3 	JJ
 
 	
r    c                    t                      | _        t                      | _        t	                      | _        || _        g | _        d | _        d | _	        d | _
        d | _        d| _        t                      | _        d S )NF)r	  guards_contextr   module_contextr   global_context	fake_modeframe_summary_stackloc_in_framefw_metadataparams_flatoutput_strides#force_unspec_int_unbacked_size_liker   tensor_to_context)r   r+  s     r   r   zTracingContext.__init__N  sy    +oo+oo+oo"#%  ! DH 490!8!:!:r    c               +    K   i }t                                           }|                                 D ]}t          ||          ||<   |                                 D ]\  }}t          |||           	 d V  |                                D ]\  }}t          |||           d S # |                                D ]\  }}t          |||           w xY wr;   )r   r  r   r  itemssetattr)kwargspriorr&  keyvals        r   patchzTracingContext.patchq  s         "";;== 	+ 	+C c**E#JJ 	# 	#HCCc""""	'EEE!KKMM ' 'SS#&&&&' 'EKKMM ' 'SS#&&&&'s   4B% %-Cc                    t                                           } | t          j                    S t	          | j                  }| j        |                    | j                   t          j                            |          S r;   )	r   r  	tracebackStackSummaryr   r,  r-  r   	from_list)r   rQ   s     r   r  zTracingContext.extract_stack  sl    %%''<)+++T-..(LL*+++%//666r    c               #    K   t                                           } t          j        j                            | dg           5  t          j        j                            | dd           5  	 d V  n*# t          $ r}t          |d          sd |_         d }~ww xY w	 d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )Nr,  r-  
real_stack)	r   r  unittestmockr:  objectr   hasattrr@  )tces     r   clear_framezTracingContext.clear_frame  sd      !!] ''%r
 
 	 	=%%b.$??	 	   $ q,// (#'AL) 		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	sZ   'B?)B'+A0/B'0
B:BBB'B?'B+	+B?.B+	/B??CCc              #    K   t                                           }| |j                            |            |j        }d |_        	 d V  n<# t
          $ r/}t          |d          s|                                |_         d }~ww xY w	 | |j        	                                 ||_        d S # | |j        	                                 ||_        w xY w)Nr@  )
r   r  r,  r   r-  r   rD  r  r@  pop)frame_summaryrE  oldrF  s       r   current_framezTracingContext.current_frame  s      
 !!$"))-888o		"EEEE 	 	 	1l++ 2!//11	  (&**,,,!BOOO (&**,,,!BO!!!!s*   A B- 
B*B  BB- -$Cc               #     K   t                                           } | d V  d S | j        }g | _        	 | j        V  || _        d S # || _        w xY wr;   )r   r  r0  )rE  old_output_stridess     r   report_output_stridesz$TracingContext.report_output_strides  st       ##%%:JJJF.	3#### 2B 2B2222s   	A 	Ac                j    t          j        | ||          t                                          _        d S r;   )r<  FrameSummaryr   r  r-  )filenamelineno
frame_names      r   set_current_loczTracingContext.set_current_loc  s0    ,5,Bfj-
 -
)))r    N)r8   r!  )r8   r   )r"   r#   r$   r   r   r  r  r   r   r:  r  
contextlibrG  rL  rO  rU  r&   r    r   r   r   :  sD         6 6 6 \6 
 
 
 \
!; !; !;F ' ' ^ \' 7 7 \7    \: " "  \"& 
3 
3  \
3 
 
 \
 
 
r    r   contextc              #     K   t          t          dd           }| t          _        	 | V  |t          _        d S # |t          _        w xY wr  )r  r  r  )rW  old_contexts     r   r  r    sP      $ 1488K"D+*{****s	   8 Ar!  c              #    K   t          t          dd          }| t          _        	 | V  n># t          $ r1}t	          |d          s| |                                 |_         d}~ww xY w	 | 1| j        *| j        j        | j        j        	                                 |t          _        dS # | 1| j        *| j        j        | j        j        	                                 |t          _        w xY w)z
    This function installs the passed in tracing context as a dynamic scoped
    global variable.

    Calls to TracingContext.get() while not under a `with tracing()` context
    will return None.
    r#  Nr@  )
r  r  r#  r   rD  r  r@  r+  	shape_envcleanup)rW  rY  rF  s      r   tracingr]    s      $ 1488K"D+   q,'' 	3G,?"0022AL 	 !-!+7'//111* !-!+7'//111*****s&   + B+ 
A&,A!!A&&B+ +AC,T)frozenc                  4    e Zd Zd ZddZddZddZdd
ZdS )rU   c                    t                      r;   NotImplementedError)r   codegens     r   reconstructzSource.reconstruct       !###r    r8   r/   c                    t                      r;   ra  r   s    r   rv   zSource.guard_source  re  r    r-   c                    t                      r;   ra  r   s    r   r_   zSource.name  re  r    rT   c                ~    |                                  t          j        u rt                      t	          | |          S r;   )rv   r/   rH   rb  rT   )r   fns     r   
make_guardzSource.make_guard	  s6    +"666%'''T2r    r9   c                N    |                                                                  S r;   )rv   rB   r   s    r   rB   zSource.is_nn_module  s       ""//111r    Nr   r   )r8   rT   rF   )r"   r#   r$   rd  rv   r_   rj  rB   r&   r    r   rU   rU     ss        $ $ $$ $ $ $$ $ $ $   
2 2 2 2 2 2r    rU   c                      e Zd ZU ded<   dS )ChainedSourcerU   baseNrR   r&   r    r   rm  rm    s         LLLLLr    rm  inputsr   c                   ddl m}m} g }t                                          x}r!|j        }||                    |ddf           ddlm} t          t           |                                D ]-\  }}t          ||          r|                    |d|f           .t          j        |           }	t          |	          D ]2\  }}
t          |
|          r|                    |
j        d|f           3|r[|d         \  }}}|dd         D ]B\  }}}||u s8J d	| d
| d| d| d
| d| d| d| d|j         d| d| d|j                     C|S dS )a  
    Attempts to "detect" what the current fake mode is.  If there is one ambiently
    available from TracingContext, we preferentially use that.  Otherwise, we
    heuristically detect the fake mode via the following sources, in order of
    priority:

        - Currently active fake mode on stack
        - Fake mode associated with passed in tensors (inputs does not
          have to be flattened)
    r   )
FakeTensorFakeTensorModeNztracing context) _get_current_dispatch_mode_stackzactive fake modezfake tensor inputr0   zfake mode (z) from r   z doesn't match mode (z

fake mode from z allocated at:
z
fake mode from )torch._subclasses.fake_tensorrq  rr  r   r  r+  r   torch.utils._python_dispatchrs  	enumeratereversedrp   pytreetree_leavesrQ   )ro  rq  rr  
fake_modesrW  r+  rs  imflat_inputs
flat_inputdesc1i1desc2i2s                  r   detect_fake_moder    sG    IHHHHHHHJ ((***w A%	 y*;Q?@@@MMMMMM(#C#C#E#EFFGG : :1a(( 	:q"4a8999$V,,K";// N N:j*-- 	Nz35H!LMMM 
)!}	5"&qrrN 	 	LAub>>>Hi H H H H H HQR H H[` H Hce H H"'H H*,H H>GoH H"'H H*,H H>?gH H ">>>
 tr    )rW  r  )rW  r!  r;   )ro  r   )D
__future__r   rV  dataclassesenumrq   logging	threadingr<  unittest.mockrA  ry   abcr   r   r   typingr   r   r	   r
   r   r   r   r   r   r   r   torchtorch.utilsr   rx  torch.utils._tracebackr   torch.utils.weakr   	getLoggerr"   r   sympyr   r(   Enumr/   rL   rO   	dataclassrT   r   r   r   r   r   r   r   r   r   r   r	  localr  r  r   r  r]  rU   rm  r  r&   r    r   <module>r     s   " " " " " "                            # # # # # # # # % % % % % %                           ) ) ) ) ) ) 4 4 4 4 4 4 4 4 4 4 4 4g!!  
 LLL
: 
: 
: 
: 
:
 
: 
: 
:
7 
7 
7 
7 
7j 
7 
7 
7
 
 
 
 
$) 
 
 
@	 	 	 	 	 	 	 	       
 T' T' T' T' T' T' T' T'n GCLL 	 	 	 	 	 	 	 	 : : : : :l : : :
    S'!*   
( ( ( ( ( ( ( (.( ( ( ( ( ( ( (.	+ 	+ 	+ 	+ 	+N#?@ 	+ 	+ 	+( ( ( ( ( ( ( (.    N#?@   B $  $  $  $  $  $  $  $F< < < < <N#89 < < < y&6 6 6 6 6 6 6 6@Z
 Z
 Z
 Z
 Z
 Z
 Z
 Z
z + + + + + + + +8 d###2 2 2 2 2 2 2 $#2( d###    F   $#) ) ) ) ) ) )r    