Skip to content

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

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
Jun 29, 2025

Conversation

lesteve
Copy link
Member

@lesteve lesteve commented Jun 24, 2025

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?

Copy link

github-actions bot commented Jun 24, 2025

✔️ 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
Copy link
Member

@betatim betatim left a comment

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
Copy link
Member Author

lesteve commented Jun 26, 2025

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
Copy link

drew-parsons commented Jun 28, 2025

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.

Copy link
Member

@jeremiedbb jeremiedbb left a comment

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
37 checks passed
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