Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update CI to test againt latest everything #707

Merged
merged 3 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on: [push, pull_request]
jobs:
run:
name: ${{ matrix.os }} py==${{ matrix.python_version }} - sklearn${{ matrix.sklearn_version }} - ${{ matrix.onnxrt_version }}
name: ${{ matrix.os }} py==${{ matrix.python_version }} - sklearn${{ matrix.sklearn_version }} - ${{ matrix.onnxrt_version }} - xgboost${{ matrix.xgboost_version }} - lightgbm${{ matrix.lgbm_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -18,15 +18,6 @@ jobs:
sklearn_version: '==1.6.0'
lgbm_version: ">=4"
xgboost_version: ">=2"
- python_version: '3.12'
documentation: 0
numpy_version: '>=1.21.1'
scipy_version: '>=1.7.0'
onnx_version: 'onnx==1.16.0'
onnxrt_version: 'onnxruntime==1.18.0'
sklearn_version: '==1.4.2'
lgbm_version: ">=4"
xgboost_version: ">=2"
- python_version: '3.11'
documentation: 0
numpy_version: '>=1.21.1'
Expand Down Expand Up @@ -96,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
Expand Down
20 changes: 8 additions & 12 deletions tests/xgboost/test_xgboost_converters_base_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ def test_xgbregressor_sparse_base_score(self):
rf = XGBRegressor(n_estimators=3, max_depth=4, random_state=0, base_score=0.5)
rf.fit(X_sp, y)
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())
# expected sparse is expected ot be diffrent than expected,
# expected_sparse = rf.predict(X_sp).astype(np.float32).reshape((-1, 1))

onx = convert_xgboost(
rf,
Expand All @@ -64,9 +63,8 @@ def test_xgbregressor_sparse_no_base_score(self):
rf = XGBRegressor(n_estimators=3, max_depth=4, random_state=0)
rf.fit(X_sp, y)
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())
# expected sparse is expected ot be diffrent than expected,
# expected_sparse = rf.predict(X_sp).astype(np.float32).reshape((-1, 1))

onx = convert_xgboost(
rf,
Expand Down Expand Up @@ -94,9 +92,8 @@ def test_xgbclassifier_sparse_base_score(self):
rf = XGBClassifier(n_estimators=3, max_depth=4, random_state=0, base_score=0.5)
rf.fit(X_sp, y)
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())
# expected sparse is expected ot be diffrent than expected,
# expected_sparse = rf.predict_proba(X_sp).astype(np.float32).reshape((-1, 1))

onx = convert_xgboost(
rf,
Expand Down Expand Up @@ -124,9 +121,8 @@ def test_xgbclassifier_sparse_no_base_score(self):
rf = XGBClassifier(n_estimators=3, max_depth=4, random_state=0)
rf.fit(X_sp, y)
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())
# expected sparse is expected ot be diffrent than expected,
# expected_sparse = rf.predict_proba(X_sp).astype(np.float32).reshape((-1, 1))

onx = convert_xgboost(
rf,
Expand Down
Loading