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

DeleteCatalyst integration for migration to optuna-integration #4644

Merged
merged 2 commits into from
May 10, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/tests-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ jobs:
if [ ${{ matrix.python-version }} == 3.11 ]; then
pytest tests -m "integration" \
--ignore tests/integration_tests/test_botorch.py \
--ignore tests/integration_tests/test_catalyst.py \
--ignore tests/integration_tests/test_fastaiv2.py \
--ignore tests/integration_tests/test_lightgbm.py \
--ignore tests/integration_tests/test_mxnet.py \
Expand All @@ -103,7 +102,6 @@ jobs:
if [ ${{ matrix.python-version }} == 3.11 ]; then
pytest tests -m "integration and not slow" \
--ignore tests/integration_tests/test_botorch.py \
--ignore tests/integration_tests/test_catalyst.py \
--ignore tests/integration_tests/test_fastaiv2.py \
--ignore tests/integration_tests/test_lightgbm.py \
--ignore tests/integration_tests/test_mxnet.py \
Expand Down
9 changes: 0 additions & 9 deletions docs/source/reference/integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ BoTorch
optuna.integration.botorch.qnehvi_candidates_func
optuna.integration.botorch.qparego_candidates_func

Catalyst
--------

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

optuna.integration.CatalystPruningCallback

CatBoost
--------

Expand Down
30 changes: 2 additions & 28 deletions optuna/integration/catalyst.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,4 @@
from packaging import version
from optuna_integration.catalyst import CatalystPruningCallback

from optuna._deprecated import deprecated_class
from optuna._imports import try_import


with try_import() as _imports:
import catalyst

if version.parse(catalyst.__version__) < version.parse("21.3"):
raise ImportError(
f"You don't have Catalyst>=21.3 installed! Catalyst version: {catalyst.__version__}"
)
from catalyst.dl import OptunaPruningCallback

if not _imports.is_successful():
OptunaPruningCallback = object # NOQA


@deprecated_class("2.7.0", "4.0.0")
class CatalystPruningCallback(OptunaPruningCallback):
"""Catalyst callback to prune unpromising trials.

This class is an alias to Catalyst's
`OptunaPruningCallback <https://catalyst-team.github.io/catalyst/api/callbacks.html?highlight=optuna#catalyst.callbacks.optuna.OptunaPruningCallback>`_.

See the Catalyst's documentation for the detailed description.
""" # NOQA

pass
__all__ = ["CatalystPruningCallback"]
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ document = [
]
integration = [
"botorch>=0.4.0; python_version<'3.11'",
"catalyst>=21.3; python_version<'3.11'",
"catboost>=0.26; sys_platform!='darwin'",
"catboost>=0.26,<1.2; sys_platform=='darwin'",
"cma",
Expand Down
18 changes: 0 additions & 18 deletions tests/integration_tests/test_catalyst.py

This file was deleted.