Skip to content

Commit

Permalink
Merge pull request optuna#5249 from y0z/feature/migrate-lightgbm
Browse files Browse the repository at this point in the history
Migrate LightGBM integration
  • Loading branch information
HideakiImamura authored Feb 15, 2024
2 parents f13ae18 + 591a0ed commit 32f5ce9
Show file tree
Hide file tree
Showing 18 changed files with 64 additions and 3,077 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
# `sphinx` requires either Python >= 3.8 or `typed-ast` to reflect type comments
# `sphinx` requires either Python >= 3.8 or `typed-ast` to reflect type comments
# in the documentation. See: https://github.com/sphinx-doc/sphinx/pull/6984
install:
- method: pip
Expand Down
12 changes: 0 additions & 12 deletions docs/source/reference/integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ For most of the ML frameworks supported by Optuna, the corresponding Optuna inte

For scikit-learn, an integrated :class:`~optuna.integration.OptunaSearchCV` estimator is available that combines scikit-learn BaseEstimator functionality with access to a class-level ``Study`` object.

LightGBM
--------

.. autosummary::
:toctree: generated/
:nosignatures:

optuna.integration.LightGBMPruningCallback
optuna.integration.lightgbm.train
optuna.integration.lightgbm.LightGBMTuner
optuna.integration.lightgbm.LightGBMTunerCV

MLflow
------

Expand Down
70 changes: 36 additions & 34 deletions optuna/integration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,41 @@
}


__all__ = [
"AllenNLPExecutor",
"AllenNLPPruningCallback",
"BoTorchSampler",
"CatalystPruningCallback",
"CatBoostPruningCallback",
"ChainerPruningExtension",
"ChainerMNStudy",
"CmaEsSampler",
"PyCmaSampler",
"DaskStorage",
"MLflowCallback",
"WeightsAndBiasesCallback",
"KerasPruningCallback",
"LightGBMPruningCallback",
"LightGBMTuner",
"LightGBMTunerCV",
"TorchDistributedTrial",
"PyTorchIgnitePruningHandler",
"PyTorchLightningPruningCallback",
"OptunaSearchCV",
"ShapleyImportanceEvaluator",
"SkorchPruningCallback",
"MXNetPruningCallback",
"SkoptSampler",
"TensorBoardCallback",
"TensorFlowPruningHook",
"TFKerasPruningCallback",
"XGBoostPruningCallback",
"FastAIV1PruningCallback",
"FastAIV2PruningCallback",
"FastAIPruningCallback",
]


if TYPE_CHECKING:
from optuna.integration.allennlp import AllenNLPExecutor
from optuna.integration.allennlp import AllenNLPPruningCallback
Expand Down Expand Up @@ -77,6 +112,7 @@ class _IntegrationModule(ModuleType):
imports all submodules and their dependencies (e.g., chainer, keras, lightgbm) all at once.
"""

__all__ = __all__
__file__ = globals()["__file__"]
__path__ = [os.path.dirname(__file__)]

Expand Down Expand Up @@ -113,37 +149,3 @@ def _get_module(self, module_name: str) -> ModuleType:
)

sys.modules[__name__] = _IntegrationModule(__name__)

__all__ = [
"AllenNLPExecutor",
"AllenNLPPruningCallback",
"BoTorchSampler",
"CatalystPruningCallback",
"CatBoostPruningCallback",
"ChainerPruningExtension",
"ChainerMNStudy",
"CmaEsSampler",
"PyCmaSampler",
"DaskStorage",
"MLflowCallback",
"WeightsAndBiasesCallback",
"KerasPruningCallback",
"LightGBMPruningCallback",
"LightGBMTuner",
"LightGBMTunerCV",
"TorchDistributedTrial",
"PyTorchIgnitePruningHandler",
"PyTorchLightningPruningCallback",
"OptunaSearchCV",
"ShapleyImportanceEvaluator",
"SkorchPruningCallback",
"MXNetPruningCallback",
"SkoptSampler",
"TensorBoardCallback",
"TensorFlowPruningHook",
"TFKerasPruningCallback",
"XGBoostPruningCallback",
"FastAIV1PruningCallback",
"FastAIV2PruningCallback",
"FastAIPruningCallback",
]
19 changes: 0 additions & 19 deletions optuna/integration/_lightgbm_tuner/__init__.py

This file was deleted.

138 changes: 0 additions & 138 deletions optuna/integration/_lightgbm_tuner/_train.py

This file was deleted.

Loading

0 comments on commit 32f5ce9

Please sign in to comment.