-
-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
TST Extend tests for scipy.sparse/*array
in sklearn/manifold/tests/test_spectral_embedding
#27240
TST Extend tests for scipy.sparse/*array
in sklearn/manifold/tests/test_spectral_embedding
#27240
Conversation
…st_spectral_embedding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM.
I think there are still some failing tests, and I'm looking into it. Previously I did not have |
I don't see the traceback but I assume that somewhere we have I have to go back to some previous PR to check if I omit such changes. |
This case seems to be a bit different, I got:
This seems to imply that if sparse.issparse(adjacency) and not sparse.isspmatrix(adjacency):
adjacency = adjacency.toarray() But this does not seem to be desired. Somehow I need a method to convert |
Actually, there is a bug with |
Indeed, we can convert it by calling the I will open an issue/PR in SciPy to fix it. |
OK. So the bug has been solved in scipy/scipy#19156 Would you mind to copy paste the |
Sure, I don't have time at this moment but will revisit in a day. |
@glemaitre Do we need to write some comment at the beginning of the |
I will do that and add an additional entry in the changelog acknowledging the non-support for 64-bits indices in |
…e-XIAO/scikit-learn into tst_sp_spectral_embedding
I checked that merging #27372 and solve the issue in this PR. |
Looking at the failure, it seems like this has been fixed in scipy 1.11.2 scipy/scipy#18644. It looks like the nomkl environment can only get scipy 1.11.1 because it is using the |
@lesteve But it means that we don't support SciPy from 1.8 to 1.11.1. |
Maybe we can find a way to convey that sparse array support is experimental for now? |
Thanks @jeromedockes for your analysis, I opened scipy/scipy#19246 upstream. |
I would be fine stating in the changelog that the support of scipy sparse arrays in scikit-learn estimators requires the latest release of scipy, or even the future 1.12.0 (even if scipy sparse arrays were introduced in 1.8). |
oops I think @glemaitre had already opened one |
OK so we merged #27372, we should be able to go forward with this PR now. @Charlie-XIAO would you mind resolving the conflicts? |
Sure, having followed the progress of that issue for long~ |
Strange that codecov is complaining about |
Done, I think things are looking good so far. @glemaitre |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We will need another reviewer on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @Charlie-XIAO!
A few comments and suggestions regarding mentioning and integrating the recent support of int64 in SciPy graph traversal routine; otherwise LGTM.
This file is a copy of the scipy.sparse.csgraph._laplacian module from SciPy 1.12 | ||
|
||
Laplacian of a compressed-sparse graph |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you indicate the following in this header
- the license of this code
- the reason for vendoring the code
- potential modifications
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added the license and reason for vendoring the code. There is no modification, and I have provided the PR link in scipy that solved the issue.
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
@jjerphan Sorry for my delayed response. I have addressed your suggestions, so would you mind taking another look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…/test_spectral_embedding` (scikit-learn#27240) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Towards #27090.