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

Skip to content

MAINT bumpversion Python and dependencies #27910

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 21 commits into from
Dec 12, 2023

Conversation

glemaitre
Copy link
Member

@glemaitre glemaitre commented Dec 7, 2023

Towards the release of scikit-learn 1.4.

Bumping the version of some libraries:

  • Python
  • NumPy
  • SciPy
  • Pandas
  • Scikit-image

This would be required by #25275 to have Python 3.9 as minimum and thus newer version. I found that pandas could be bump in this PR: #26120

The bump are really minimum.

Copy link

github-actions bot commented Dec 7, 2023

✔️ Linting Passed

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

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

@glemaitre glemaitre changed the title MAINT bumpversion Python, NumPy, SciPy, and Pandas MAINT bumpversion Python and dependencies Dec 7, 2023
@jeremiedbb
Copy link
Member

Given that numpy and scipy dropped support for python 3.8, I think it's fine to do it as well. We still support 3 versions of Python.

Tests are failing btw, something wrong with the min deps

@glemaitre
Copy link
Member Author

Tests are failing btw, something wrong with the min deps

I forgot to bump SciPy in the pyproject.toml. We should get closer to the right solution :).

@glemaitre glemaitre added this to the 1.4 milestone Dec 7, 2023
Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

The version bumps look reasonable to me.

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

With the minimum Python version as 3.9, we can remove the oldest-supported-numpy line:

# Starting with NumPy 1.25, NumPy is (by default) as far back compatible
# as oldest-support-numpy was (customizable with a NPY_TARGET_VERSION
# define). For older Python versions continue using oldest-support-numpy.
"numpy>=1.25; python_version>='3.9'",
"oldest-supported-numpy; python_version<'3.9'",

Otherwise LGTM

@glemaitre
Copy link
Member Author

This is weird. For the second time, the build for the default channel is failing and I see that the job that is having a timeout has some failure before to timeout.

I would think that we need to investigate the reason to see if we reproduce locally. Maybe NumPy or SciPy version of the default channel is yanked.

@ogrisel
Copy link
Member

ogrisel commented Dec 8, 2023

Could you re-run the failing CI job with --max-fail=10 so that we get details on the problem before reaching the timeout?

We might want to add --max-fail=10 by default in all our CIs as most of the time, when we get a very large number of failures at once, they are caused by a few common causes and trying to exhaustively analyze a gigantic error log is counter productive. We tend to fix problems incrementally when it happens.

@adrinjalali
Copy link
Member

I don't think we should block anything for conda default channel though. We've had issues not related to us in the past.

@glemaitre
Copy link
Member Author

glemaitre commented Dec 11, 2023

I don't think we should block anything for conda default channel though. We've had issues not related to us in the past.

I don't think this is a big deal here. This is just that we need to set the right version of scipy and numpy. I am actually wondering why we use the minimum when it comes to the defaults channel

Edit: actually we have one such build: pylatest_conda_mkl_no_openmp

@glemaitre
Copy link
Member Author

Uhm it seems that the issue was only transient.

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.

LGTM besides the following nitpick. Fixing the nitpick is an opportunity to rerun the build to check that the previous failure was indeed transient prior to merging.

@ogrisel
Copy link
Member

ogrisel commented Dec 11, 2023

Please also rerun with [cd build] once more just to be sure.

@lesteve
Copy link
Member

lesteve commented Dec 11, 2023

@glemaitre
Copy link
Member Author

Looks like it has come back

OK I will push-back with the maxfail flag. I just hope that this flag does not scare the errors :P

@glemaitre
Copy link
Member Author

Youpi!!!!:

ValueError: On entry to DLASCL parameter number 4 had an illegal value

I am betting on upgrading to SciPy 1.6.2 as it will be useful to #27943.


"scipy>=1.5.0",
"numpy>=1.25",
"scipy>=1.6.0",
Copy link
Member

Choose a reason for hiding this comment

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

👍

@glemaitre
Copy link
Member Author

So I bumped to 1.7 SciPy on the pymin defaults channel. because 1.5/1.6 seems to fail. I will make a new push to be sure that 2 successive builds are working.

@glemaitre
Copy link
Member Author

Merging this one since we have 3 approvals and the CI is passing.

@glemaitre glemaitre merged commit e8ec36c into scikit-learn:main Dec 12, 2023
@lesteve
Copy link
Member

lesteve commented Dec 12, 2023

FYI, quickly looking at it, it seems like scipy 1.6 is the first release that officially supports Python 3.9
see 1.6 setup.py and 1.5 setup.py. Also Python 3.9 wheels are only available for scipy 1.6.

@glemaitre
Copy link
Member Author

I set 1.6.0 because this is the version in debian 32-bits with python 3.9

@EwoutH
Copy link

EwoutH commented May 24, 2024

Now that scikit-learn 1.5 is released, it might be worth considering dropping Python 3.9 (and thus requiring Python 3.10+) towards the development of scikit-learn 1.6.

This would follow SPEC 0, which recommends dropping Python 3.9 in late 2023.

@glemaitre
Copy link
Member Author

As far I recall, we had an internal vote regarding endorsing the SLEP0. We should probably close the vote and check if we endorse it or not.

In case of not endorsing it, I recall that we mentioned that we would write how we would bump version to avoid this type of recurrent discussion.

@lucascolley
Copy link
Contributor

As far I recall, we had an internal vote regarding endorsing the SLEP0. We should probably close the vote and check if we endorse it or not.

In case of not endorsing it, I recall that we mentioned that we would write how we would bump version to avoid this type of recurrent discussion.

@glemaitre was there any update on this? I am trying to integrate array-api-extra in gh-30340 which requires Python>=3.10 as per https://scientific-python.org/specs/spec-0000/, but there are failures due to sklearn still supporting Python 3.9.

@glemaitre
Copy link
Member Author

At the end, we decided to not endorse the SLEP000. We apply a more conservative policy and in general people were not keen into endorsing a recommendation that we don't follow in the project.

Regarding the specific here, we might consider dropping support for Python 3.9 before the release of 1.7 since we already support 5 versions currently. The fact that the array-api-extra is failing is an potentially an argument for it. However, Python 3.9 "end-of-life" is Oct. 2025. Looking at the failure, it is a bit of a pity that it is caused by typing that it is something that we barely use in the code base.

@lucascolley
Copy link
Contributor

Okay, thanks. A big +1 from me if you could consider dropping 3.9 soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants