Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate LightGBM integration #5249

Merged
merged 22 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.