Skip to content

Commit 05dbdbb

Browse files
authored
Remove SKOptLearner because scikit-optimize is unmaintained (#404)
scikit-optimize/scikit-optimize#1205
1 parent 68f1928 commit 05dbdbb

12 files changed

+3
-406
lines changed

adaptive/__init__.py

-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from contextlib import suppress
2-
31
from adaptive._version import __version__
42
from adaptive.learner import (
53
AverageLearner,
@@ -47,11 +45,5 @@
4745
"Runner",
4846
]
4947

50-
with suppress(ImportError):
51-
# Only available if 'scikit-optimize' is installed
52-
from adaptive.learner import SKOptLearner # noqa: F401
53-
54-
__all__.append("SKOptLearner")
55-
5648
# to avoid confusion with `notebook_extension`
5749
del notebook_integration # type: ignore[name-defined] # noqa: F821

adaptive/learner/__init__.py

-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from contextlib import suppress
2-
31
from adaptive.learner.average_learner import AverageLearner
42
from adaptive.learner.average_learner1D import AverageLearner1D
53
from adaptive.learner.balancing_learner import BalancingLearner
@@ -24,9 +22,3 @@
2422
"AverageLearner1D",
2523
"SequenceLearner",
2624
]
27-
28-
with suppress(ImportError):
29-
# Only available if 'scikit-optimize' is installed
30-
from adaptive.learner.skopt_learner import SKOptLearner # noqa: F401
31-
32-
__all__.append("SKOptLearner")

adaptive/learner/skopt_learner.py

-185
This file was deleted.

adaptive/tests/test_learners.py

-10
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@
3030
from adaptive.learner.learner1D import with_pandas
3131
from adaptive.runner import simple
3232

33-
try:
34-
from adaptive.learner.skopt_learner import SKOptLearner
35-
except (ModuleNotFoundError, ImportError):
36-
# XXX: catch the ImportError because of https://github.com/scikit-optimize/scikit-optimize/issues/902
37-
SKOptLearner = None # type: ignore[assignment,misc]
38-
39-
4033
LOSS_FUNCTIONS = {
4134
Learner1D: (
4235
"loss_per_interval",
@@ -574,7 +567,6 @@ def test_balancing_learner(learner_type, f, learner_kwargs):
574567
LearnerND,
575568
AverageLearner,
576569
AverageLearner1D,
577-
maybe_skip(SKOptLearner),
578570
IntegratorLearner,
579571
SequenceLearner,
580572
with_all_loss_functions=False,
@@ -607,7 +599,6 @@ def test_saving(learner_type, f, learner_kwargs):
607599
LearnerND,
608600
AverageLearner,
609601
AverageLearner1D,
610-
maybe_skip(SKOptLearner),
611602
IntegratorLearner,
612603
SequenceLearner,
613604
with_all_loss_functions=False,
@@ -646,7 +637,6 @@ def fname(learner):
646637
LearnerND,
647638
AverageLearner,
648639
AverageLearner1D,
649-
maybe_skip(SKOptLearner),
650640
IntegratorLearner,
651641
with_all_loss_functions=False,
652642
)

adaptive/tests/test_skopt_learner.py

-48
This file was deleted.

docs/environment.yml

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ channels:
66
dependencies:
77
- python=3.10
88
- sortedcollections=2.1.0
9-
- scikit-optimize=0.9.0
10-
- scikit-learn=1.2.2
119
- scipy=1.10.1
1210
- holoviews=1.18.3
1311
- bokeh=3.3.4

docs/source/reference/adaptive.learner.skopt_learner.md

-8
This file was deleted.

docs/source/tutorial/tutorial.SKOptLearner.md

-71
This file was deleted.

0 commit comments

Comments
 (0)