Skip to content

Commit b790f5b

Browse files
authored
MAINT CI cleanups and checks (scikit-learn#31690)
1 parent 41de3ca commit b790f5b

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

.github/workflows/cuda-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: pypa/cibuildwheel@5f22145df44122af0f5a201f93cf0207171beca7
2222
env:
2323
CIBW_BUILD: cp313-manylinux_x86_64
24-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
24+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
2525
CIBW_BUILD_VERBOSITY: 1
2626
CIBW_ARCHS: x86_64
2727

build_tools/wheels/build_wheels.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ if [[ $(uname) == "Darwin" ]]; then
4949
export LDFLAGS="$LDFLAGS -Wl,-rpath,$PREFIX/lib -L$PREFIX/lib -lomp"
5050
fi
5151

52-
if [[ "$CIBW_FREE_THREADED_SUPPORT" =~ [tT]rue ]]; then
53-
# Numpy, scipy, Cython only have free-threaded wheels on scientific-python-nightly-wheels
54-
# TODO: remove this after CPython 3.13 is released (scheduled October 2024)
55-
# and our dependencies have free-threaded wheels on PyPI
56-
export CIBW_BUILD_FRONTEND='pip; args: --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" --only-binary :all:'
57-
fi
58-
5952
# The version of the built dependencies are specified
6053
# in the pyproject.toml file, while the tests are run
6154
# against the most recent version of the dependencies

sklearn/svm/tests/test_sparse.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def test_unsorted_indices(csr_container):
125125
X, y = load_digits(return_X_y=True)
126126
X_test = csr_container(X[50:100])
127127
X, y = X[:50], y[:50]
128+
tols = dict(rtol=1e-12, atol=1e-14)
128129

129130
X_sparse = csr_container(X)
130131
coef_dense = (
@@ -135,7 +136,7 @@ def test_unsorted_indices(csr_container):
135136
)
136137
coef_sorted = sparse_svc.coef_
137138
# make sure dense and sparse SVM give the same result
138-
assert_allclose(coef_dense, coef_sorted.toarray())
139+
assert_allclose(coef_dense, coef_sorted.toarray(), **tols)
139140

140141
# reverse each row's indices
141142
def scramble_indices(X):
@@ -158,9 +159,11 @@ def scramble_indices(X):
158159
)
159160
coef_unsorted = unsorted_svc.coef_
160161
# make sure unsorted indices give same result
161-
assert_allclose(coef_unsorted.toarray(), coef_sorted.toarray())
162+
assert_allclose(coef_unsorted.toarray(), coef_sorted.toarray(), **tols)
162163
assert_allclose(
163-
sparse_svc.predict_proba(X_test_unsorted), sparse_svc.predict_proba(X_test)
164+
sparse_svc.predict_proba(X_test_unsorted),
165+
sparse_svc.predict_proba(X_test),
166+
**tols,
164167
)
165168

166169

0 commit comments

Comments
 (0)