Skip to content

Commit

Permalink
Disable smac tests on Python>=3.11, since we currently only support a…
Browse files Browse the repository at this point in the history
…n old version of smac

Signed-off-by: Avi Shinnar <shinnar@us.ibm.com>
  • Loading branch information
shinnar committed Feb 5, 2024
1 parent 3880a99 commit b41c247
Showing 1 changed file with 17 additions and 0 deletions.
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

0 comments on commit b41c247

Please sign in to comment.