From 2630821d87ebd7d7f2f9b8aff076e30541abe384 Mon Sep 17 00:00:00 2001 From: xadupre Date: Mon, 23 Dec 2024 10:25:22 +0100 Subject: [PATCH] fix unittest Signed-off-by: xadupre --- tests/xgboost/test_xgboost_converters.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/xgboost/test_xgboost_converters.py b/tests/xgboost/test_xgboost_converters.py index f9bcca30..44cf71f0 100644 --- a/tests/xgboost/test_xgboost_converters.py +++ b/tests/xgboost/test_xgboost_converters.py @@ -8,6 +8,7 @@ import numpy as np from numpy.testing import assert_almost_equal import pandas +import packaging.version as pv from sklearn.datasets import ( load_diabetes, load_iris, @@ -28,6 +29,7 @@ ) except Exception: XGBRegressor = None +import sklearn from sklearn.preprocessing import StandardScaler from onnx.defs import onnx_opset_version from onnxconverter_common.onnx_ex import DEFAULT_OPSET_NUMBER @@ -376,6 +378,10 @@ def test_xgboost_10(self): ) @unittest.skipIf(XGBRegressor is None, "xgboost is not available") + @unittest.skipIf( + pv.Version(sklearn.__version__) < pv.Version("1.6.0"), + "move parameters from fit to the convstructor", + ) def test_xgboost_classifier_i5450_softmax(self): iris = load_iris() X, y = iris.data, iris.target