§
    ezni�  ã            
       óv  — d Z ddlmZ ddlmZ d„ Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zi deg“deg“deg“d eg“d!e	g“d"e
g“d#eg“d$eg“d%eg“d&eg“d'eg“d(eg“d)eg“d*eg“d+eg“d,eg“d-eg“egegegegegegegegd.œ¥Zd/„ Zd0„ Z d1S )2zBase callbacks.é    )Údefaultdict)Údeepcopyc                 ó   — dS )z-Called before the pretraining routine starts.N© ©Útrainers    ú€/var/www/html/cool-property-finder/image-detection-backend/venv/lib/python3.11/site-packages/ultralytics/utils/callbacks/base.pyÚon_pretrain_routine_startr
   
   ó   € à€Dó    c                 ó   — dS )z*Called after the pretraining routine ends.Nr   r   s    r	   Úon_pretrain_routine_endr      r   r   c                 ó   — dS )z Called when the training starts.Nr   r   s    r	   Úon_train_startr      r   r   c                 ó   — dS )z+Called at the start of each training epoch.Nr   r   s    r	   Úon_train_epoch_startr      r   r   c                 ó   — dS )z+Called at the start of each training batch.Nr   r   s    r	   Úon_train_batch_startr      r   r   c                 ó   — dS )z'Called when the optimizer takes a step.Nr   r   s    r	   Úoptimizer_stepr   #   r   r   c                 ó   — dS )z,Called before the gradients are set to zero.Nr   r   s    r	   Úon_before_zero_gradr   (   r   r   c                 ó   — dS )z)Called at the end of each training batch.Nr   r   s    r	   Úon_train_batch_endr   -   r   r   c                 ó   — dS )z)Called at the end of each training epoch.Nr   r   s    r	   Úon_train_epoch_endr   2   r   r   c                 ó   — dS )z2Called at the end of each fit epoch (train + val).Nr   r   s    r	   Úon_fit_epoch_endr   7   r   r   c                 ó   — dS )zCalled when the model is saved.Nr   r   s    r	   Úon_model_saver    <   r   r   c                 ó   — dS )zCalled when the training ends.Nr   r   s    r	   Úon_train_endr"   A   r   r   c                 ó   — dS )z-Called when the model parameters are updated.Nr   r   s    r	   Úon_params_updater$   F   r   r   c                 ó   — dS )z3Called during the teardown of the training process.Nr   r   s    r	   Úteardownr&   K   r   r   c                 ó   — dS )z"Called when the validation starts.Nr   ©Ú	validators    r	   Úon_val_startr*   S   r   r   c                 ó   — dS )z-Called at the start of each validation batch.Nr   r(   s    r	   Úon_val_batch_startr,   X   r   r   c                 ó   — dS )z+Called at the end of each validation batch.Nr   r(   s    r	   Úon_val_batch_endr.   ]   r   r   c                 ó   — dS )z Called when the validation ends.Nr   r(   s    r	   Ú
on_val_endr0   b   r   r   c                 ó   — dS )z"Called when the prediction starts.Nr   ©Ú	predictors    r	   Úon_predict_startr4   j   r   r   c                 ó   — dS )z-Called at the start of each prediction batch.Nr   r2   s    r	   Úon_predict_batch_startr6   o   r   r   c                 ó   — dS )z+Called at the end of each prediction batch.Nr   r2   s    r	   Úon_predict_batch_endr8   t   r   r   c                 ó   — dS )z8Called after the post-processing of the prediction ends.Nr   r2   s    r	   Úon_predict_postprocess_endr:   y   r   r   c                 ó   — dS )z Called when the prediction ends.Nr   r2   s    r	   Úon_predict_endr<   ~   r   r   c                 ó   — dS )z$Called when the model export starts.Nr   ©Úexporters    r	   Úon_export_startr@   †   r   r   c                 ó   — dS )z"Called when the model export ends.Nr   r>   s    r	   Úon_export_endrB   ‹   r   r   r
   r   r   r   r   r   r   r   r   r   r    r"   r$   r&   r*   r,   r.   )r0   r4   r6   r:   r8   r<   r@   rB   c                  óP   — t          t          t          t          ¦  «        ¦  «        S )zÐ
    Return a copy of the default_callbacks dictionary with lists as default values.

    Returns:
        (defaultdict): A defaultdict with keys from default_callbacks and empty lists as default values.
    )r   Úlistr   Údefault_callbacksr   r   r	   Úget_default_callbacksrF   ³   s   € õ •t�XÕ&7Ñ8Ô8Ñ9Ô9Ð9r   c           
      ój  — ddl m} |g}d| j        j        v rMddlm} ddlm} ddlm} ddlm} ddlm} ddl	m} ddl
m}	 ddlm}
 |                     |||||||	|
g¦  «         |D ]K}|                     ¦   «         D ]4\  }}|| j        |         vr | j        |                              |¦  «         Œ5ŒLdS )z÷
    Add integration callbacks from various sources to the instance's callbacks.

    Args:
        instance (Trainer, Predictor, Validator, Exporter): An object with a 'callbacks' attribute that is a dictionary
            of callback lists.
    é   )Ú	callbacksÚTrainerN)ÚhubrI   Ú	__class__Ú__name__ÚclearmlÚcometÚdvcÚmlflowÚneptuneÚraytuneÚtensorboardÚwbÚextendÚitemsÚappend)ÚinstanceÚhub_cbÚcallbacks_listÚclear_cbÚcomet_cbÚdvc_cbÚ	mlflow_cbÚ
neptune_cbÚtune_cbÚtb_cbÚwb_cbrI   ÚkÚvs                 r	   Úadd_integration_callbacksrf   ½   sU  € ð )Ð(Ð(Ð(Ð(Ð(Ø�X€Nð �HÔ&Ô/Ð/Ð/Ø2Ð2Ð2Ð2Ð2Ð2Ø0Ð0Ð0Ð0Ð0Ð0Ø,Ð,Ð,Ð,Ð,Ð,Ø2Ð2Ð2Ð2Ð2Ð2Ø4Ð4Ð4Ð4Ð4Ð4Ø1Ð1Ð1Ð1Ð1Ð1Ø3Ð3Ð3Ð3Ð3Ð3Ø*Ð*Ð*Ð*Ð*Ð*Ø×Ò˜x¨°6¸9ÀjÐRYÐ[`ÐbgÐhÑiÔiÐið $ð 0ð 0ˆ	Ø—O’OÑ%Ô%ð 	0ð 	0‰DˆAˆqØ˜Ô*¨1Ô-Ð-Ð-ØÔ" 1Ô%×,Ò,¨QÑ/Ô/Ð/øð	0ð0ð 0r   N)!Ú__doc__Úcollectionsr   Úcopyr   r
   r   r   r   r   r   r   r   r   r   r    r"   r$   r&   r*   r,   r.   r0   r4   r6   r8   r:   r<   r@   rB   rE   rF   rf   r   r   r	   ú<module>rj      s  ðà Ð à #Ð #Ð #Ð #Ð #Ð #Ø Ð Ð Ð Ð Ð ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð
	ð 	ð 	ð	ð 	ð 	ð
	ð 	ð 	ð
 &àÐ";Ð!<ð &ð Ð 7Ð8ð &ð �~Ð&ð	 &ð
 Ð1Ð2ð &ð Ð1Ð2ð &ð �~Ð&ð &ð Ð/Ð0ð &ð Ð-Ð.ð &ð Ð-Ð.ð &ð Ð)Ð*ð &ð �m�_ð &ð �\�Nð &ð Ð)Ð*ð &ð ��
ð &ð$ �\�Nð% &ð& Ð-Ð.ð' &ð( Ð)Ð*ð) &ð* �,ð *Ð*Ø5Ð6Ø#=Ð">Ø1Ð2Ø%Ð&ð (Ð(Ø#�_ðA &ð  &ð  &Ð ðF:ð :ð :ð0ð 0ð 0ð 0ð 0r   