Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MAINT sync lobpcg with SciPy main #25176

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

Merged
merged 8 commits into from
Dec 14, 2022
Merged

Conversation

glemaitre
Copy link
Member

Before addressing the issue of the eigvals deprecation in eigh function, I think that we should update the lobpcg function.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming everything goes well with respect to the scikit-learn test suite, +1 for the sync on my side.

@glemaitre
Copy link
Member Author

OK, so we trigger the error seen in the scipy-dev build. Need to investigate if the error is triggered by the new parameter restartControl making our test brittle.

@ogrisel ogrisel added Waiting for Reviewer Quick Review For PRs that are quick to review Waiting for Second Reviewer First reviewer is done, need a second one! labels Dec 13, 2022
Comment on lines +469 to +474
if "subset_by_index" in inspect.signature(eigh).parameters:
# scipy >= 1.5
additional_params = {"subset_by_index": eigvals}
else:
# deprecated in scipy == 1.10
additional_params = {"eigvals": eigvals}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this change here. Since it is in a try ... except ... the error could be hidden because we don't pass the right parameter. I assume that we never trigger this part in our test suite.

Copy link
Member

@lesteve lesteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tweaked a comment to say that the code is taken from v1.10 (or rather main but I guess scipy 1.10 will be released in the near future since 1.10.rc1 was released two days ago)

@lesteve lesteve closed this Dec 14, 2022
@lesteve lesteve reopened this Dec 14, 2022
@lesteve lesteve enabled auto-merge (squash) December 14, 2022 11:04
@lesteve lesteve merged commit 53a1609 into scikit-learn:main Dec 14, 2022
Vincent-Maladiere pushed a commit to Vincent-Maladiere/scikit-learn that referenced this pull request Dec 14, 2022
Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 3, 2023
Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 20, 2023
Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 20, 2023
Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 23, 2023
Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
adrinjalali pushed a commit that referenced this pull request Jan 24, 2023
Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No Changelog Needed Quick Review For PRs that are quick to review Waiting for Reviewer Waiting for Second Reviewer First reviewer is done, need a second one!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants