diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09568c7b..56a0f2d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,14 +87,14 @@ jobs: python -c "from sklearn import __version__;print('sklearn', __version__)" python -c "from onnxruntime import __version__;print('onnxruntime', __version__)" python -c "from onnx import __version__;print('onnx', __version__)" - python -c "from catboost import __version__;print('catboost', __version__)" python -c "import onnx.defs;print('onnx_opset_version', onnx.defs.onnx_opset_version())" - - name: versions lightgbm + - name: versions lightgbm, xgboost, catboost if: matrix.os != 'macos-latest' run: | python -c "from lightgbm import __version__;print('lightgbm', __version__)" python -c "from xgboost import __version__;print('xgboost', __version__)" + python -c "from catboost import __version__;print('catboost', __version__)" - name: Run tests baseline run: pytest --maxfail=10 --durations=10 tests/baseline diff --git a/tests/xgboost/test_xgboost_converters_base_score.py b/tests/xgboost/test_xgboost_converters_base_score.py index e719aa01..7f221855 100644 --- a/tests/xgboost/test_xgboost_converters_base_score.py +++ b/tests/xgboost/test_xgboost_converters_base_score.py @@ -37,7 +37,7 @@ def test_xgbregressor_sparse_base_score(self): expected = rf.predict(X).astype(np.float32).reshape((-1, 1)) expected_sparse = rf.predict(X_sp).astype(np.float32).reshape((-1, 1)) diff = np.abs(expected - expected_sparse) - self.assertNotEqual(diff.min(), diff.max()) + self.assertNotEqual(diff.min(), diff.max(), atol=1e-5) onx = convert_xgboost( rf, @@ -66,7 +66,7 @@ def test_xgbregressor_sparse_no_base_score(self): expected = rf.predict(X).astype(np.float32).reshape((-1, 1)) expected_sparse = rf.predict(X_sp).astype(np.float32).reshape((-1, 1)) diff = np.abs(expected - expected_sparse) - self.assertNotEqual(diff.min(), diff.max()) + self.assertNotEqual(diff.min(), diff.max(), atol=1e-5) onx = convert_xgboost( rf, @@ -96,7 +96,7 @@ def test_xgbclassifier_sparse_base_score(self): expected = rf.predict_proba(X).astype(np.float32).reshape((-1, 1)) expected_sparse = rf.predict_proba(X_sp).astype(np.float32).reshape((-1, 1)) diff = np.abs(expected - expected_sparse) - self.assertNotEqual(diff.min(), diff.max()) + self.assertNotEqual(diff.min(), diff.max(), atol=1e-5) onx = convert_xgboost( rf, @@ -126,7 +126,7 @@ def test_xgbclassifier_sparse_no_base_score(self): expected = rf.predict_proba(X).astype(np.float32).reshape((-1, 1)) expected_sparse = rf.predict_proba(X_sp).astype(np.float32).reshape((-1, 1)) diff = np.abs(expected - expected_sparse) - self.assertNotEqual(diff.min(), diff.max()) + self.assertNotEqual(diff.min(), diff.max(), atol=1e-5) onx = convert_xgboost( rf,