
    rh"c                       d dl mZ d dlZd dlZd dlmZ d dlmZmZm	Z	 d dl
Z
d dlZd dlmZ d dl
mZmZ d dlmZ d dlmZ d d	lmZmZ d d
lmZmZmZmZ d dlmZ d dlmZ d dlm Z  d dl!m"Z" d dl#m$Z$ d dl%m&Z& d dl'm(Z( d dl)m*Z* d dl+m,Z,  e,       rd dl-m.Z. erd dl/m0Z0 d dl1m&Z&  ejd                  e3      Z4 G d de      Z5 G d de      Z6 G d de      Z7 G d dejp                        Z9 G d d      Z:y)     )annotationsN)Path)TYPE_CHECKINGAnyCallable)version)Tensornn)	Optimizer)
DataLoader)tqdmtrange)TrainerCallbackTrainerControlTrainerStateis_torch_npu_available)BatchEncoding)CrossEncoderTrainingArguments)NoDuplicatesDataLoader)SentenceLabelDataset)SentenceEvaluator)InputExample)SentenceTransformer)BatchSamplers)is_datasets_available)Dataset)CrossEncoderc                  L     e Zd ZdZd fdZddZ	 	 	 	 	 	 	 	 	 	 	 	 ddZ xZS )SaveModelCallbackao  A Callback to save the model to the `output_dir`.

    If save_best_model is True and evaluator is defined, then we save on evaluate, but only if the new model is
    better than the currently saved one according to the evaluator.

    This differs from the `SaveModelCallback` used in SentenceTransformer.fit where the model is saved after
    training as well.
    c                Z    t         |           || _        || _        || _        d | _        y N)super__init__
output_dir	evaluatorsave_best_modelbest_metric)selfr$   r%   r&   	__class__s       /var/www/html/ai-insurance-compliance-backend/venv/lib/python3.12/site-packages/sentence_transformers/cross_encoder/fit_mixin.pyr#   zSaveModelCallback.__init__0   s,    $".    c                l    t        | j                  dd      r|| j                  kD  S || j                  k  S )Ngreater_is_betterT)getattrr%   r'   )r(   
new_metrics     r*   	is_betterzSaveModelCallback.is_better7   s5    4>>#6= 0 000D,,,,r+   c                :   | j                   | j                  rt        | j                   dd      }|j                         D ]W  \  }}	|j	                  |      s| j
                  | j                  |	      s6|	| _        |j                  | j                         Y y y y Nprimary_metricr%   )	r%   r&   r.   itemsendswithr'   r0   saver$   )
r(   argsstatecontrolmetricsmodelkwargs
metric_keykeyvalues
             r*   on_evaluatezSaveModelCallback.on_evaluate<   s     >>%$*>*> 1A;OJ%mmo 4
U<<
+''/4>>%3H+0(

4??3	4 +?%r+   )r$   strr%   SentenceEvaluator | Noner&   boolreturnNone)r/   floatrD   rC   )r7   r   r8   r   r9   r   r:   dict[str, Any]r;   r   rD   rE   )__name__
__module____qualname____doc__r#   r0   r@   __classcell__r)   s   @r*   r   r   &   sQ     -
4+4 4  	4
  4 4 
4r+   r   c                  B     e Zd ZdZdd fdZ	 	 	 	 	 	 	 	 	 	 ddZ xZS )EvaluatorCallbackzThe CrossEncoder.fit method always ran the evaluator on every epoch,
    in addition to every "evaluation_steps". This callback is responsible for that.

    The `.trainer` must be provided after the trainer has been created.
    c                   t         |           || _        || _        | j                  Pt        j
                  j                  | j                  d      | _        t	        j                  | j                  d       d| _        d | _	        y )NevalTexist_ok)
r"   r#   r%   output_pathospathjoinmakedirsmetric_key_prefixtrainer)r(   r%   rT   r)   s      r*   r#   zEvaluatorCallback.__init__U   si    "&'!ww||D,<,<fEDKK((48!'r+   c                   | j                  || j                  |j                  |j                        }t	        |t
              sd|i}t        |j                               D ]D  }|j                  | j                   d      r"|j                  |      || j                   d| <   F | j                  *| j                  j                  j                  ||||       y y )NrT   epochstepsr%   _)r:   )r%   rT   r]   global_step
isinstancedictlistkeys
startswithrY   poprZ   callback_handlerr@   )r(   r7   r8   r9   r;   r<   evaluator_metricsr>   s           r*   on_epoch_endzEvaluatorCallback.on_epoch_end`   s     !NNt//u{{%J[J[ + 
 +T2!,.? @ )..01 	bC>>T%;%;$<A">?GXG\G\]`Ga!T%;%;$<AcU"CD	b <<#LL))55dE7Te5f $r+   r!   )r%   r   rT   
str | NonerD   rE   )
r7   r   r8   r   r9   r   r;   r   rD   rE   )rH   rI   rJ   rK   r#   ri   rL   rM   s   @r*   rO   rO   N   sH    	g+g g  	g
 g 
gr+   rO   c                  @     e Zd ZdZd fdZ	 	 	 	 	 	 	 	 	 	 ddZ xZS )OriginalCallbackzA Callback to invoke the original callback function that was provided to CrossEncoder.fit()

    This callback has the following signature: `(score: float, epoch: int, steps: int) -> None`
    c                >    t         |           || _        || _        y r!   )r"   r#   callbackr%   )r(   rn   r%   r)   s      r*   r#   zOriginalCallback.__init__}   s     "r+   c                    t        | j                  dd      }|j                         D ]?  \  }}|j                  |      s| j	                  ||j
                  |j                        c S  y r2   )r.   r%   r4   r5   rn   r]   r`   )	r(   r7   r8   r9   r:   r<   r=   r>   r?   s	            r*   r@   zOriginalCallback.on_evaluate   s[     T^^-={K
!--/ 	LJC||J'}}UEKK9J9JKK	Lr+   )rn   !Callable[[float, int, int], None]r%   r   rD   rE   )
r7   r   r8   r   r9   r   r:   rG   rD   rE   )rH   rI   rJ   rK   r#   r@   rL   rM   s   @r*   rl   rl   w   sH    
#
L+L L  	L
  L 
Lr+   rl   c                  N     e Zd ZdZ ej
                         fd fdZddZ xZS )FitMixinLossznA wrapper around the torch loss function that just accepts logits and labels, to be used in CrossEncoder.fit()c                L    t         |           || _        || _        || _        y r!   )r"   r#   r;   loss_fctactivation_fn)r(   r;   rt   ru   r)   s       r*   r#   zFitMixinLoss.__init__   s$    
 *r+   c                *   t        |      dk7  rt        dt        |       d      t        t        |d   |d               }| j                  j                  |ddd      }|j                  | j                  j                          | j                  d
i |d   }| j                  j                  j                  dk(  r"|j                  d	      }|j                         }n|j                         }| j                  |      }| j                  ||      }|S )N   z\BinaryCrossEntropyLoss expects a dataset with two non-label columns, but got a dataset with z	 columns.r      Tptpadding
truncationreturn_tensors )len
ValueErrorrc   zipr;   	tokenizertodeviceconfig
num_labelsviewrF   longru   rt   )r(   inputslabelspairstokenslogitslosss          r*   forwardzFitMixinLoss.forward   s   v;!norsyozn{  |E  F  SF1I./%%	 & 
 			$**##$%f%a(::''1,[[_F\\^F[[]F##F+}}VV,r+   )r;   r   rt   	nn.Moduleru   r   rD   rE   )r   zlist[list[str]]r   r	   rD   r	   )	rH   rI   rJ   rK   r
   Identityr#   r   rL   rM   s   @r*   rr   rr      s    x\g\^\g\g\i +r+   rr   c                     e Zd ZdZddd ej
                         ddej                  j                  ddidd	dd
dddd
f	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	ddZ
ddZddd ej
                         ddej                  j                  ddidd	dd
dddd
f	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZddZy)FitMixinzUMixin class for injecting the `fit` and `old_fit` methods into the CrossEncoder classNrx   WarmupLineari'  lrgh㈵>g{Gz?r   TFc           
       ' t               st        d      ddlm} ddlm} ddlm} d }||_        t        |dd      }t        |t              rt        j                  }nGt        |d	      r+t        |j                  t               rt        j"                  }nt        j$                  }g }g }|D ];  }t'        |D cg c]  }|j(                  |j*                  f c} \  }}||z  }||z  }= t-        j.                  t1        t'        |       D ci c]  \  }}d
| | c}}      } d}!	 t3        |      dhk(  rd}!|!r| j7                  d|      } d!d}"t9        j:                  t<        j>                        t9        j:                  d      k\  rdnd}#tA        d" |"       ||||d|#||dkD  rdndi|||| dd}$tC        | jE                               }%g d}&|%D ''(cg c]  \  '}(tG        'fd|&D              r|( c}(}'|
d|%D ''(cg c]  \  '}(tG        'fd|&D              s|( c}(}'ddg}) ||)fi |	}*t        |tH              r5tK        |       |z  }+tM        |+|z        },tO        jP                  |*|||,      }-|/| jR                  jT                  dk(  r || |      }n || |      }ntW        | ||      }g }.|8|.jY                  t[        ||             ||.jY                  t]        ||              || |$| d|||*-f|.       }/||/j_                  ta        |||             |/jc                          yc c}w c c}}w # t4        $ r Y w xY wc c}(}'w c c}(}'w )#aX  
        Deprecated training method from before Sentence Transformers v4.0, it is recommended to use
        :class:`~sentence_transformers.trainer.CrossEncoderTrainer` instead. This method uses
        :class:`~sentence_transformers.trainer.CrossEncoderTrainer` behind the scenes, but does
        not provide as much flexibility as the Trainer itself.

        This training approach uses a DataLoader and Loss function to train the model.

        This method should produce equivalent results in v4.0 as before v4.0, but if you encounter any issues
        with your existing training scripts, then you may wish to use
        :meth:`CrossEncoder.old_fit <sentence_transformers.cross_encoder.CrossEncoder.old_fit>` instead.
        That uses the old training method from before v4.0.

        Args:
            train_dataloader: The DataLoader with InputExample instances
            evaluator: An evaluator (sentence_transformers.cross_encoder.evaluation)
                evaluates the model performance during training on held-
                out dev data. It is used to determine the best model
                that is saved to disk.
            epochs: Number of epochs for training
            loss_fct: Which loss function to use for training. If None,
                will use BinaryCrossEntropy() if self.config.num_labels == 1
                else CrossEntropyLoss(). Defaults to None.
            activation_fct: Activation function applied on top of logits
                output of model.
            scheduler: Learning rate scheduler. Available schedulers:
                constantlr, warmupconstant, warmuplinear, warmupcosine,
                warmupcosinewithhardrestarts
            warmup_steps: Behavior depends on the scheduler. For
                WarmupLinear (default), the learning rate is increased
                from o up to the maximal learning rate. After these many
                training steps, the learning rate is decreased linearly
                back to zero.
            optimizer_class: Optimizer
            optimizer_params: Optimizer parameters
            weight_decay: Weight decay for model parameters
            evaluation_steps: If > 0, evaluate the model using evaluator
                after each number of training steps
            output_path: Storage path for the model and evaluation files
            save_best_model: If true, the best model (according to
                evaluator) is stored at output_path
            max_grad_norm: Used for gradient normalization.
            use_amp: Use Automatic Mixed Precision (AMP). Only for
                Pytorch >= 1.6.0
            callback: Callback function that is invoked after each
                evaluation. It must accept the following three
                parameters in this order: `score`, `epoch`, `steps`
            show_progress_bar: If True, output a tqdm progress bar
        zGPlease install `datasets` to use this function: `pip install datasets`.r   )BinaryCrossEntropyLoss)CrossEntropyLoss)CrossEncoderTrainerc                    | S r!   r   )batchs    r*   identityzFitMixin.fit.<locals>.identity  s    Lr+   
batch_size   dataset	sentence_TFlabelc                 @   d} d}t        |       j                         rt        t        t        |       j	                                     dk7  rRd| } |dz  }t        |       j                         r/t        t        t        |       j	                                     dk7  rR| S )Nzcheckpoints/modelrx   r   zcheckpoints/model_)r   existsr   rc   iterdir)dir_nameidxs     r*   _default_checkpoint_dirz-FitMixin.fit.<locals>._default_checkpoint_dir!  s    *HCx.'')c$tH~7M7M7O2P.QUV.V/u5q x.'')c$tH~7M7M7O2P.QUV.V Or+   z4.41.0eval_strategyevaluation_strategy)r$   batch_samplerper_device_train_batch_sizeper_device_eval_batch_sizenum_train_epochsNr^   no)
eval_stepsmax_grad_normfp16disable_tqdmsave_strategybiaszLayerNorm.biaszLayerNorm.weightc              3  &   K   | ]  }|v  
 y wr!   r   .0ndns     r*   	<genexpr>zFitMixin.fit.<locals>.<genexpr>E       C_PRB!GC_   paramsweight_decayc              3  &   K   | ]  }|v  
 y wr!   r   r   s     r*   r   zFitMixin.fit.<locals>.<genexpr>H       <XR1W<Xr           	schedulerwarmup_stepst_totalrx   )ru   )rt   ru   )r;   r7   train_dataseteval_datasetr   r%   
optimizers	callbacks)rD   rA   r   )2r   ImportErrorAsentence_transformers.cross_encoder.losses.BinaryCrossEntropyLossr   ;sentence_transformers.cross_encoder.losses.CrossEntropyLossr   +sentence_transformers.cross_encoder.trainerr   
collate_fnr.   ra   r   r   NO_DUPLICATEShasattrr   r   GROUP_BY_LABELBATCH_SAMPLERr   textsr   r   	from_dict	enumerateset	TypeError
add_columnr   parsetransformers__version__r   rc   named_parametersanyrA   r   intr   _get_schedulerr   r   rr   appendrO   rl   add_callbackr   train)0r(   train_dataloaderr%   epochsrt   activation_fctr   r   optimizer_classoptimizer_paramsr   evaluation_stepsrT   r&   r   use_amprn   show_progress_barr   r   r   r   r   r   r   r   r   examplebatch_textsbatch_labelsr   textr   add_label_columnr   eval_strategy_keyr7   param_optimizerno_decayr   poptimizer_grouped_parameters	optimizersteps_per_epochnum_train_stepsscheduler_objr   rZ   s0                                          `        r*   fitzFitMixin.fit   s   J %&ghh 	m`S	 '/#-|Q?
&(>?)77M%y1jAQAYAY[o6p)88M)77M% 	#E(+\a-bQXw}}gmm.L-b(c%K[ El"F	#  ))T]^ach^iTj*kysDYse+<d+B*kl	6{qc!#(  )44WfEM	 }}\556'--:QQ & 	
 - 
.0'(2'1#
 ".>.JO_bcOc7im
 ('..
" t4467A *9``AC_V^C_@_1` , '6YYda<Xx<X9XYkno(
$ $$@UDTU	i%!-0J>O!/F":;O/>>Y\SbM {{%%*1$nU+DO#D8>ZH 	 .y+FG#  !1(I!FG%'!=1	
 "  !2;	?![\{ .c +l  		R a Zs6   :L=
M
*M M:M
M'M	MMc                   t        t        |d   j                              D cg c]  }g  }}g }|D ]\  }t        |j                        D ]'  \  }}||   j	                  |j                                ) |j	                  |j                         ^  | j                  |dddd}| j                  !|d   j                  d   | j                  k  sJ t        j                  || j                  j                  dk(  rt        j                  nt        j                        j!                  | j"                  j$                        }|D ]-  }	||	   j!                  | j"                  j$                        ||	<   / ||fS c c}w )	Nr   Tlongest_firstry   rz   	input_idsrx   )dtype)ranger   r   r   r   stripr   r   
max_lengthshapetorchtensorr   r   rF   r   r   r;   r   )
r(   r   r_   r   r   r   r   r   	tokenizednames
             r*   smart_batching_collatezFitMixin.smart_batching_collater  sZ   "3uQx~~#67888 	)G&w}}5 0	Tc
!!$**,/0 MM'--(		) #DNN&	
	 &)K*@*F*Fq*IT__*\\\f4;;;Q;QUV;VEKK\a\f\fgjjJJ
  	DD'o001B1BCIdO	D &  / 9s   	E:c                   t        t        |d               D cg c]  }g  }}|D ]7  }t        |      D ]'  \  }}||   j                  |j	                                ) 9  | j
                  |dddd}| j                  !|d   j                  d   | j                  k  sJ |D ]-  }||   j                  | j                  j                        ||<   / |S c c}w )Nr   Try   rz   r   )r  r   r   r   r  r   r  r  r   r;   r   )	r(   r   r_   r   r   r   r   r  r  s	            r*    smart_batching_collate_text_onlyz)FitMixin.smart_batching_collate_text_only  s    "3uQx=1222 	0G&w/ 0	Tc
!!$**,/0	0 #DNN	
	 &)K*@*F*Fq*IT__*\\\ 	DD'o001B1BCIdO	D # 3s   	Cc           
     	   | j                   |_        |r[t               r)t        j                  j
                  j                         }n(t        j                  j
                  j                         }|t        j                  |d       d| _
        t        t        |      |z        }t        | j                  j                               }g d}|D cg c]  \  }t!        fd|D              r| c}}|
d|D cg c]  \  }t!        fd|D              s| c}}d	dg} ||fi |	}t#        |t$              rt'        j(                  ||||
      }|A| j*                  j,                  dk(  rt/        j0                         nt/        j2                         }d}t5        |d|       D ]  }d}| j                  j7                          | j                  j9                          t;        |dd|       D ]  \  }}|rOt        j<                  | j                  j>                  j@                        5   | j                  di |ddi} ||jB                        } | j*                  j,                  dk(  r| jE                  d      }  || |      }!ddd       jG                         }"|jI                  !      jK                          |jM                  |       t        j.                  jN                  jQ                  | j                  jS                         |       |jU                  |       |jW                          |jG                         |"k7  }n | j                  di |ddi} ||jB                        } | j*                  j,                  dk(  r| jE                  d      }  || |      }!|!jK                          t        j.                  jN                  jQ                  | j                  jS                         |       |jU                          |j7                          |s|jU                          |dz  }|A|dkD  sH||z  dk(  sR| jY                  ||||||       | j                  j7                          | j                  j9                           || jY                  ||||d|        yc c}}w c c}}w # 1 sw Y   1xY w)a	  
        Deprecated training method from before Sentence Transformers v4.0, it is recommended to use
        :class:`~sentence_transformers.trainer.CrossEncoderTrainer` instead. This method should
        only be used if you encounter issues with your existing training scripts after upgrading to v4.0.

        This training approach uses a DataLoader and Loss function to train the model.

        Args:
            train_dataloader: The DataLoader with InputExample instances
            evaluator: An evaluator (sentence_transformers.cross_encoder.evaluation)
                evaluates the model performance during training on held-
                out dev data. It is used to determine the best model
                that is saved to disk.
            epochs: Number of epochs for training
            loss_fct: Which loss function to use for training. If None,
                will use BinaryCrossEntropy() if self.config.num_labels == 1
                else CrossEntropyLoss(). Defaults to None.
            activation_fct: Activation function applied on top of logits
                output of model.
            scheduler: Learning rate scheduler. Available schedulers:
                constantlr, warmupconstant, warmuplinear, warmupcosine,
                warmupcosinewithhardrestarts
            warmup_steps: Behavior depends on the scheduler. For
                WarmupLinear (default), the learning rate is increased
                from o up to the maximal learning rate. After these many
                training steps, the learning rate is decreased linearly
                back to zero.
            optimizer_class: Optimizer
            optimizer_params: Optimizer parameters
            weight_decay: Weight decay for model parameters
            evaluation_steps: If > 0, evaluate the model using evaluator
                after each number of training steps
            output_path: Storage path for the model and evaluation files
            save_best_model: If true, the best model (according to
                evaluator) is stored at output_path
            max_grad_norm: Used for gradient normalization.
            use_amp: Use Automatic Mixed Precision (AMP). Only for
                Pytorch >= 1.6.0
            callback: Callback function that is invoked after each
                evaluation. It must accept the following three
                parameters in this order: `score`, `epoch`, `steps`
            show_progress_bar: If True, output a tqdm progress bar
        NTrR   iigr   c              3  &   K   | ]  }|v  
 y wr!   r   r   s     r*   r   z#FitMixin.old_fit.<locals>.<genexpr>  r   r   r   c              3  &   K   | ]  }|v  
 y wr!   r   r   s     r*   r   z#FitMixin.old_fit.<locals>.<genexpr>  r   r   r   r   rx   FEpoch)descdisabler   	Iterationg?)r  	smoothingr  )device_typereturn_dictr~   r   )-r	  r   r   r  npuamp
GradScalercudarU   rX   
best_scorer   r   rc   r;   r   r   ra   rA   r   r   r   r   r
   BCEWithLogitsLossr   r   	zero_gradr   r   autocastr   typer   r   	get_scalescalebackwardunscale_utilsclip_grad_norm_
parametersstepupdate_eval_during_training)#r(   r   r%   r   rt   r   r   r   r   r   r   r   rT   r&   r   r   rn   r   scalerr   r   r   r   r   r   r   skip_schedulerr]   training_stepsfeaturesr   model_predictionsr   
loss_valuescale_before_steps#                         `            r*   old_fitzFitMixin.old_fit  s   ~ '+&A&A#%'113224"KKd3"c"23f<= tzz::<=A *9``AC_V^C_@_1` , '6YYda<Xx<X9XYkno(
$ $$@UDTU	i%+::Y\SbI 151G1G11Lr++-RTReReRgHF>O:OP 2	iENJJ  "JJ$( {dPaLa% *' & DJJ4E4E4J4JK >,6DJJ,T,Tt,T)!/0A0H0H!I;;11Q6%+[[_F%-ff%=
> )/(8(8(:%LL,557OOI.HHNN224::3H3H3JMZKK	*MMO%+%5%5%7;L%LN(2

(PX(P4(P%+,=,D,DEF{{--2!'R!)&&!9J'')HHNN224::3H3H3JMZNN$##%%NN$!#(-=-AnWgFgklFl..!;X` JJ((*JJ$$&U*'X $**9k?TY[]_ghe2	i# a Z.> >s%   R71R7R=R=8ASSc                   |} || |||      }|
 ||||       t        |t              r)t        |d      r|j                  |v r||j                     }|| j                  kD  r|| _        |r| j                  |       yyyy)z#Runs evaluation during the trainingNr\   r3   )ra   rb   r   r3   r  r6   )r(   r%   rT   r&   r]   r^   rn   scores           r*   r(  zFitMixin._eval_during_training8  s     d5PUVE#u-%&79>N+OT]TlTlpuTui667t&"'"IIk* # ' !r+   )"r(   r   r   r   r%   rB   r   r   r   rA   r   r   r   type[Optimizer]r   dict[str, object]r   rF   r   r   rT   rj   r&   rC   r   rF   r   rC   rn   rp   r   rC   rD   rE   )r   list[InputExample]rD   ztuple[BatchEncoding, Tensor])r   r5  rD   r   ) r   r   r%   rB   r   r   r   rA   r   r   r   r3  r   r4  r   rF   r   r   rT   rj   r&   rC   r   rF   r   rC   rn   rp   r   rC   rD   rE   )rD   rE   )rH   rI   rJ   rK   r
   r   r  optimAdamWr   r	  r  r0  r(  r   r+   r*   r   r      s(   _
 /3"r{{}'!+0;;+<+</3Tl" !"& $ 6:"&%{{${ ,{ 	{ { { ){ ,{ { {  { { {  !{" 4#{$  %{& 
'{z!4. /3"r{{}'!+0;;+<+</3Tl" !"& $ 6:"&%Vi$Vi ,Vi 	Vi Vi Vi )Vi ,Vi Vi Vi  Vi Vi Vi  !Vi" 4#Vi$  %Vi& 
'Vip+r+   r   );
__future__r   loggingrU   pathlibr   typingr   r   r   r  r   	packagingr   r	   r
   torch.optimr   torch.utils.datar   tqdm.autonotebookr   r   r   r   r   r   $transformers.tokenization_utils_baser   1sentence_transformers.cross_encoder.training_argsr   5sentence_transformers.datasets.NoDuplicatesDataLoaderr   3sentence_transformers.datasets.SentenceLabelDatasetr   2sentence_transformers.evaluation.SentenceEvaluatorr   sentence_transformers.readersr   )sentence_transformers.SentenceTransformerr   #sentence_transformers.training_argsr   sentence_transformers.utilr   datasetsr   0sentence_transformers.cross_encoder.CrossEncoderr   *sentence_transformers.readers.InputExample	getLoggerrH   loggerr   rO   rl   Modulerr   r   r   r+   r*   <module>rO     s    "  	  / /     ! ' * ^ ^ > [ X T P 6 I = < MG 
		8	$%4 %4P&g &gRL L2299 DQ+ Q+r+   