Skip to content

MNT Remove deprecated iprint and disp usage in scipy 1.15 LBFGS - #31642

Merged
jeremiedbb merged 8 commits into
scikit-learn:mainfrom
lesteve:lbfgs-iprint
Jun 29, 2025
Merged

jeremiedbb merged 8 commits into
scikit-learn:mainfrom
lesteve:lbfgs-iprint

Conversation

@lesteve

@lesteve lesteve commented Jun 24, 2025 •

Copy link
Copy Markdown
Member

Fix #31624

iprint and disp do not do anything since scipy 1.15 and for scipy >= 1.16 a DeprecationWarning is emitted, see scipy/scipy#23186 (comment).

I guess a side-effect is that for people who cared about this additional info, it won't be available any more with scipy >= 1.15 but this seems like a scipy decision and I am not sure we can do much about it, unless maybe there is another way to have a similar info?

@github-actions

github-actions Bot commented Jun 24, 2025 •

Copy link
Copy Markdown

✔️ Linting Passed

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

Generated for commit: e830d8f. Link to the linter CI: here

@lesteve lesteve changed the title MNT Remove deprecated iprint usage in scipy 1.15 LBFGS MNT Remove deprecated iprint and disp usage in scipy 1.15 LBFGS Jun 24, 2025
Comment thread sklearn/utils/fixes.py Resolved

@betatim betatim 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.

Looks good to me

Not sure if it is worth adding a test

@lesteve

lesteve commented Jun 26, 2025

Copy link
Copy Markdown
Member Author

Not sure if it is worth adding a test

It feels like the main test is that there is no warning (turned into error) into the scipy-dev build (or with scipy 1.16 when we update the lock-file and we actually use scipy 1.16)?

@betatim betatim added Waiting for Second Reviewer First reviewer is done, need a second one! Quick Review For PRs that are quick to review labels Jun 26, 2025
@drew-parsons

drew-parsons commented Jun 28, 2025 •

Copy link
Copy Markdown

The error (emission of DeprecationWarning) fixed by this PR can be seen in tests of the debian package against scipy 1.16.0, https://ci.debian.net/data/autopkgtest/unstable/amd64/s/scikit-learn/61828718/log.gz

Note there seems to be a separate scipy 1.16.0 error in test_logistic_regression_path_convergence_fail.

@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. Thanks @lesteve

Let's merge as is to free the CI. In the future we may have to update or possibly even deprecate the verbose parameter of some estimators since it's usually what controls iprint

@jeremiedbb
jeremiedbb merged commit 983d982 into scikit-learn:main Jun 29, 2025
@lesteve
lesteve deleted the lbfgs-iprint branch July 7, 2025 08:24
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jul 15, 2025
@jeremiedbb jeremiedbb mentioned this pull request Jul 15, 2025
13 tasks done
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jul 16, 2025
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jul 16, 2025
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jul 16, 2025
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:linear_model module:neural_network module:utils Quick Review For PRs that are quick to review 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.

⚠️ CI failed on Linux_Nightly.pylatest_pip_scipy_dev (last failure: Jun 29, 2025) ⚠️

4 participants