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

Skip to content

Fix AttributeError use_fallback_lbfgs_solve for newton-cholesky when fitting with max_iter=0 - #26653

Merged
jeremiedbb merged 7 commits into
scikit-learn:mainfrom
ogrisel:fix-attributeerror-newtonsolver
Jun 26, 2023
Merged

Fix AttributeError use_fallback_lbfgs_solve for newton-cholesky when fitting with max_iter=0#26653
jeremiedbb merged 7 commits into
scikit-learn:mainfrom
ogrisel:fix-attributeerror-newtonsolver

Conversation

@ogrisel

@ogrisel ogrisel commented Jun 21, 2023

Copy link
Copy Markdown
Member

As found when trying to run benchopt on LogisticRegression with the newton-cholesky solver.

When writing the non-regression test, I found that both sag/saga and LBFGS also had problems with max_iter=0 but of a different nature (more minor as they would not raise an exception). See the XXX comments for details.

I plan to tackled those in dedicated follow-up PRs.

I think we should backport this fix to 1.3.0 (or 1.3.1 if the merge arrives too late).

@github-actions

github-actions Bot commented Jun 21, 2023

Copy link
Copy Markdown

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 0c55c3e. Link to the linter CI: here

@ogrisel

ogrisel commented Jun 21, 2023

Copy link
Copy Markdown
Member Author

/cc @lorentzenchr.

Comment thread doc/whats_new/v1.3.rst Outdated
Comment thread sklearn/linear_model/tests/test_logistic.py Outdated
Comment thread sklearn/linear_model/tests/test_logistic.py
Comment thread sklearn/linear_model/tests/test_logistic.py
Co-authored-by: Christian Lorentzen <[email protected]>
Comment thread sklearn/linear_model/tests/test_logistic.py Outdated
Comment thread doc/whats_new/v1.3.rst Outdated
@jeremiedbb jeremiedbb added the To backport PR merged in master that need a backport to a release branch defined based on the milestone. label Jun 26, 2023

@jeremiedbb jeremiedbb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@jeremiedbb
jeremiedbb enabled auto-merge (squash) June 26, 2023 14:07
@jeremiedbb
jeremiedbb merged commit 4e88150 into scikit-learn:main Jun 26, 2023
@ogrisel
ogrisel deleted the fix-attributeerror-newtonsolver branch June 26, 2023 15:43
jeremiedbb added a commit to jeremiedbb/scikit-learn that referenced this pull request Jun 29, 2023
…fitting with max_iter=0 (scikit-learn#26653)

Co-authored-by: Christian Lorentzen <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
jeremiedbb added a commit that referenced this pull request Jun 29, 2023
…fitting with max_iter=0 (#26653)

Co-authored-by: Christian Lorentzen <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
punndcoder28 pushed a commit to punndcoder28/scikit-learn that referenced this pull request Jul 29, 2023
…fitting with max_iter=0 (scikit-learn#26653)

Co-authored-by: Christian Lorentzen <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
…fitting with max_iter=0 (scikit-learn#26653)

Co-authored-by: Christian Lorentzen <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:linear_model To backport PR merged in master that need a backport to a release branch defined based on the milestone.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants