Skip to content

Commit

Permalink
fix unittest
Browse files Browse the repository at this point in the history
Signed-off-by: xadupre <[email protected]>
  • Loading branch information
xadupre committed Dec 23, 2024
1 parent 7126dc2 commit 2630821
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/xgboost/test_xgboost_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2630821

Please sign in to comment.