From 8429ee7851a0e65ed2df26d89ea4f2a6f68c61be Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Wed, 20 May 2020 09:57:21 +0200 Subject: [PATCH 1/3] prevent ImportError due to scikit-optimize and sklearn incompatibility See https://github.com/scikit-optimize/scikit-optimize/issues/902 This caused all tests to fail. --- adaptive/tests/test_learners.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adaptive/tests/test_learners.py b/adaptive/tests/test_learners.py index 6edee2b30..e7c15707f 100644 --- a/adaptive/tests/test_learners.py +++ b/adaptive/tests/test_learners.py @@ -29,7 +29,7 @@ try: from adaptive.learner.skopt_learner import SKOptLearner -except ModuleNotFoundError: +except (ModuleNotFoundError, ImportError): SKOptLearner = None From b71c6e8bf5374a4808ba46bec8245eb59f206d87 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Wed, 20 May 2020 10:08:21 +0200 Subject: [PATCH 2/3] add todo --- adaptive/tests/test_learners.py | 1 + 1 file changed, 1 insertion(+) diff --git a/adaptive/tests/test_learners.py b/adaptive/tests/test_learners.py index e7c15707f..580333d00 100644 --- a/adaptive/tests/test_learners.py +++ b/adaptive/tests/test_learners.py @@ -30,6 +30,7 @@ try: from adaptive.learner.skopt_learner import SKOptLearner except (ModuleNotFoundError, ImportError): + # XXX: catch the ImportError because of https://github.com/python-adaptive/adaptive/pull/278 SKOptLearner = None From c70b3acdff9b7ac7d8a1298d58b73045fdeb88f1 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Wed, 20 May 2020 10:37:38 +0200 Subject: [PATCH 3/3] link the upstream issue --- adaptive/tests/test_learners.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adaptive/tests/test_learners.py b/adaptive/tests/test_learners.py index 580333d00..6e4c4e419 100644 --- a/adaptive/tests/test_learners.py +++ b/adaptive/tests/test_learners.py @@ -30,7 +30,7 @@ try: from adaptive.learner.skopt_learner import SKOptLearner except (ModuleNotFoundError, ImportError): - # XXX: catch the ImportError because of https://github.com/python-adaptive/adaptive/pull/278 + # XXX: catch the ImportError because of https://github.com/scikit-optimize/scikit-optimize/issues/902 SKOptLearner = None