Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e3ac8b7

Browse files
committedDec 23, 2024·
version
Signed-off-by: xadupre <xadupre@microsoft.com>
1 parent fc5c5d4 commit e3ac8b7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
 

‎.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ jobs:
8787
python -c "from sklearn import __version__;print('sklearn', __version__)"
8888
python -c "from onnxruntime import __version__;print('onnxruntime', __version__)"
8989
python -c "from onnx import __version__;print('onnx', __version__)"
90-
python -c "from catboost import __version__;print('catboost', __version__)"
9190
python -c "import onnx.defs;print('onnx_opset_version', onnx.defs.onnx_opset_version())"
9291
93-
- name: versions lightgbm
92+
- name: versions lightgbm, xgboost, catboost
9493
if: matrix.os != 'macos-latest'
9594
run: |
9695
python -c "from lightgbm import __version__;print('lightgbm', __version__)"
9796
python -c "from xgboost import __version__;print('xgboost', __version__)"
97+
python -c "from catboost import __version__;print('catboost', __version__)"
9898
9999
- name: Run tests baseline
100100
run: pytest --maxfail=10 --durations=10 tests/baseline

‎tests/xgboost/test_xgboost_converters_base_score.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_xgbregressor_sparse_base_score(self):
3737
expected = rf.predict(X).astype(np.float32).reshape((-1, 1))
3838
expected_sparse = rf.predict(X_sp).astype(np.float32).reshape((-1, 1))
3939
diff = np.abs(expected - expected_sparse)
40-
self.assertNotEqual(diff.min(), diff.max())
40+
self.assertNotEqual(diff.min(), diff.max(), atol=1e-5)
4141

4242
onx = convert_xgboost(
4343
rf,
@@ -66,7 +66,7 @@ def test_xgbregressor_sparse_no_base_score(self):
6666
expected = rf.predict(X).astype(np.float32).reshape((-1, 1))
6767
expected_sparse = rf.predict(X_sp).astype(np.float32).reshape((-1, 1))
6868
diff = np.abs(expected - expected_sparse)
69-
self.assertNotEqual(diff.min(), diff.max())
69+
self.assertNotEqual(diff.min(), diff.max(), atol=1e-5)
7070

7171
onx = convert_xgboost(
7272
rf,
@@ -96,7 +96,7 @@ def test_xgbclassifier_sparse_base_score(self):
9696
expected = rf.predict_proba(X).astype(np.float32).reshape((-1, 1))
9797
expected_sparse = rf.predict_proba(X_sp).astype(np.float32).reshape((-1, 1))
9898
diff = np.abs(expected - expected_sparse)
99-
self.assertNotEqual(diff.min(), diff.max())
99+
self.assertNotEqual(diff.min(), diff.max(), atol=1e-5)
100100

101101
onx = convert_xgboost(
102102
rf,
@@ -126,7 +126,7 @@ def test_xgbclassifier_sparse_no_base_score(self):
126126
expected = rf.predict_proba(X).astype(np.float32).reshape((-1, 1))
127127
expected_sparse = rf.predict_proba(X_sp).astype(np.float32).reshape((-1, 1))
128128
diff = np.abs(expected - expected_sparse)
129-
self.assertNotEqual(diff.min(), diff.max())
129+
self.assertNotEqual(diff.min(), diff.max(), atol=1e-5)
130130

131131
onx = convert_xgboost(
132132
rf,

0 commit comments

Comments
 (0)
Please sign in to comment.