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

Disable smac tests on Python>=3.11, since we currently only support a… #1353

Merged
merged 1 commit into from
Feb 5, 2024
Merged
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
17 changes: 17 additions & 0 deletions test/test_optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
import tempfile
import unittest
import warnings
Expand Down Expand Up @@ -86,6 +87,10 @@ def iris_fmin_tae(op, num_folds=5):
return lale_op_smac_tae(op, iris_f_min_for_folds(num_folds=num_folds))


@unittest.skipIf(
sys.version_info >= (3, 11),
"SMAC interface is not currently supported with newer version of Python",
)
class TestSMAC(unittest.TestCase):
def setUp(self):
X, y = load_iris(return_X_y=True)
Expand Down Expand Up @@ -684,6 +689,10 @@ def test_with_gridsearchcv(self):
_ = best_pipeline.predict(self.X_test)
assert best_pipeline is not None

@unittest.skipIf(
sys.version_info >= (3, 11),
"SMAC interface is not currently supported with newer version of Python",
)
def test_with_smaccv(self):
planned_pipeline = (PCA | NoOp) >> LogisticRegression
best_pipeline = planned_pipeline.auto_configure(
Expand Down Expand Up @@ -1059,6 +1068,10 @@ def test_gridsearch(self):
)
_ = trained.predict(self.test_X)

@unittest.skipIf(
sys.version_info >= (3, 11),
"SMAC interface is not currently supported with newer version of Python",
)
def test_smac(self):
planned = KNeighborsClassifier
trained = planned.auto_configure(
Expand Down Expand Up @@ -1108,6 +1121,10 @@ def test_gridsearch(self):
)
_ = trained.predict(self.test_X)

@unittest.skipIf(
sys.version_info >= (3, 11),
"SMAC interface is not currently supported with newer version of Python",
)
def test_smac(self):
planned = KNeighborsRegressor
trained = planned.auto_configure(
Expand Down
Loading