-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
🔒 🤖 CI Update lock files for scipy-dev CI build(s) 🔒 🤖 #29428
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
🔒 🤖 CI Update lock files for scipy-dev CI build(s) 🔒 🤖 #29428
Conversation
By the look of it, this does not seem to be a problem in scikit-learn itself but rather an unexpected change of behavior in scipy. I will try to reproduce locally and extract a minimal reproducer to confirm. EDIT: the estimator checks only fails with test_search_cv[HalvingGridSearchCV(cv=2,error_score='raise',estimator=Pipeline(steps=[('pca',PCA()),('ridge',Ridge())]),min_resources='smallest',param_grid={'ridge__alpha':[0.1,1.0]},random_state=0)-check_estimator_sparse_array] _
Here is the relevant info from the failing traceback: ../1/s/sklearn/decomposition/_pca.py:468: in fit_transform
U, S, _, X, x_is_centered, xp = self._fit(X)
X = <Compressed Sparse Row sparse matrix of dtype 'float64'
with 0 stored elements and shape (2, 3)>
self = PCA()
y = array([2, 2]) and subsequently: E scipy.sparse.linalg._eigen.arpack.arpack.ArpackError: ARPACK error -9: Starting vector is zero. Notice that X has no non-zero entries. |
Here is a minimal repro: import numpy as np
import scipy
import scipy.sparse as sp
print(f"scipy version: {scipy.__version__}")
for out in sp.linalg.svds(np.zeros((2, 2)), k=1):
print(out) Here are the outputs for the latest stable vs dev versions of scipy: scipy version: 1.14.0
[[1.]
[0.]]
[0.]
[[-0.47655702 -0.87914356]] scipy version: 1.15.0.dev0+1098.a2c613f
Traceback (most recent call last):
File "/Users/ogrisel/tmp/repro_arpack.py", line 7, in <module>
for out in sp.linalg.svds(np.zeros((2, 2)), k=1):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ogrisel/miniforge3/envs/scipy-dev/lib/python3.12/site-packages/scipy/sparse/linalg/_eigen/_svds.py", line 515, in svds
_, eigvec = eigsh(XH_X, k=k, tol=tol ** 2, maxiter=maxiter,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ogrisel/miniforge3/envs/scipy-dev/lib/python3.12/site-packages/scipy/sparse/linalg/_eigen/arpack/arpack.py", line 1701, in eigsh
params.iterate()
File "/Users/ogrisel/miniforge3/envs/scipy-dev/lib/python3.12/site-packages/scipy/sparse/linalg/_eigen/arpack/arpack.py", line 574, in iterate
raise ArpackError(self.info, infodict=self.iterate_infodict)
scipy.sparse.linalg._eigen.arpack.arpack.ArpackError: ARPACK error -9: Starting vector is zero. I will report upstream. |
…29428) Co-authored-by: Lock file bot <noreply@github.com> Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
Co-authored-by: Lock file bot <noreply@github.com> Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
Update lock files.
Note
If the CI tasks fail, create a new branch based on this PR and add the required fixes to that branch.