o
    }oi*                     @   sh  d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlmZ i dddgd	d
gddgddgddgddgddgddgddgddgdg dddgdd gd!d"gd#d$gd%d&gd'd(gd)gd*gd+gd,gd-gd.d/gd0Z	g d1Z
er#d d2lmZ d d3lmZ d d4lmZ d d5lmZ d d6lmZ d d7lmZ d d8lmZ d d9l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 dAl%m&Z& d dBl'm(Z( d dCl)m*Z* d dDl+m,Z, d dEl-m.Z. d dFl/m0Z0 d dGl1m2Z2 d dHl3m4Z4 d dIl5m6Z6 d dJl7m8Z8 d dKl9m:Z: d dLl;m<Z< dS G dMdN dNeZ=e=e>ej?e>< dS )O    N)
ModuleType)Any)TYPE_CHECKING)"_INTEGRATION_IMPORT_ERROR_TEMPLATEallennlpAllenNLPExecutorAllenNLPPruningCallbackbotorchBoTorchSamplercatboostCatBoostPruningCallbackchainerChainerPruningExtension	chainermnChainerMNStudycmaPyCmaSamplerdaskDaskStoragemlflowMLflowCallbackwandbWeightsAndBiasesCallbackkerasKerasPruningCallbacklightgbm)LightGBMPruningCallbackLightGBMTunerLightGBMTunerCVpytorch_distributedTorchDistributedTrialpytorch_ignitePyTorchIgnitePruningHandlerpytorch_lightningPyTorchLightningPruningCallbacksklearnOptunaSearchCVshapShapleyImportanceEvaluatorskorchSkorchPruningCallbackMXNetPruningCallbackTensorBoardCallbackTensorFlowPruningHookTFKerasPruningCallbackXGBoostPruningCallbackFastAIV2PruningCallbackFastAIPruningCallback)mxnettensorboard
tensorflowtfkerasxgboostfastaiv2)r   r   r
   r   r   r   r   r   r   r   r   r   r   r   r    r"   r$   r&   r(   r*   r+   r,   r-   r.   r/   r0   r1   )r   )r   )r
   )r   )r   )r   )r   )r   )r1   )r0   )r   )r   )r   )r   )r   )r+   )r    )r"   )r$   )r(   )r&   )r*   )r,   )r-   )r.   )r   )r/   c                   @   s   e Zd ZdZeZe d Zej	egZ
ee Zi Ze D ]\ZZeD ]Zeee< q&q dedefddZdedefdd	Zd
S )_IntegrationModuleal  Module class that implements `optuna.integration` package.

        This class applies lazy import under `optuna.integration`, where submodules are imported
        when they are actually accessed. Otherwise, `import optuna` becomes much slower because it
        imports all submodules and their dependencies (e.g., chainer, keras, lightgbm) all at once.
        __file__namereturnc                 C   sb   || j v r| |}n|| j v r | | j| }t||}n	td| j|t| || |S )Nzmodule {} has no attribute {})	_modules_get_module_class_to_modulekeysgetattrAttributeErrorformat__name__setattr)selfr:   valuemodule rH   O/home/ubuntu/.local/lib/python3.10/site-packages/optuna/integration/__init__.py__getattr__t   s   
z_IntegrationModule.__getattr__module_namec                 C   s:   dd l }z
|d| | jW S  ty   tt|w )Nr   .)	importlibimport_modulerC   ModuleNotFoundErrorr   rB   )rE   rK   rM   rH   rH   rI   r=      s   z_IntegrationModule._get_moduleN)rC   
__module____qualname____doc____all__globalsr9   ospathdirname__path__set_import_structurer?   r<   r>   itemskeyvaluesrF   strr   rJ   r   r=   rH   rH   rH   rI   r8   b   s    

r8   )@rU   systypesr   typingr   r   optuna._importsr   rZ   rS   optuna.integration.allennlpr   r   optuna.integration.botorchr
   optuna.integration.catboostr   optuna.integration.chainerr   optuna.integration.chainermnr   optuna.integration.cmar   optuna.integration.daskr   optuna.integration.fastaiv2r1   r0   optuna.integration.kerasr   optuna.integration.lightgbmr   r   r   optuna.integration.mlflowr   optuna.integration.mxnetr+   &optuna.integration.pytorch_distributedr    !optuna.integration.pytorch_igniter"   $optuna.integration.pytorch_lightningr$   optuna.integration.shapr(   optuna.integration.sklearnr&   optuna.integration.skorchr*   optuna.integration.tensorboardr,   optuna.integration.tensorflowr-   optuna.integration.tfkerasr.   optuna.integration.wandbr   optuna.integration.xgboostr/   r8   rC   modulesrH   rH   rH   rI   <module>   s    	
&