Skip to content
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

FIX add long long for int32/int64 windows compat in NumPy 2.0 #29029

Merged
merged 2 commits into from
May 17, 2024

Conversation

glemaitre
Copy link
Member

closes #29028

Since NumPy 2.0 will switch from long to long long for Windows machine, then it seems that we have trigger a non-matching type as shown here: conda-forge/scikit-learn-feedstock#259 (comment)

This should fix it.

@glemaitre
Copy link
Member Author

@jeremiedbb since you have a windows machine where you can build scikit-learn, could you give a try and run the test test_KNeighborsClassifier_raise_on_all_zero_weights to be sure that we don't raise the TypeError?

Copy link

github-actions bot commented May 16, 2024

✔️ Linting Passed

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

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

@glemaitre glemaitre added this to the 1.5 milestone May 16, 2024
@glemaitre glemaitre modified the milestones: 1.5, 1.4.3 May 16, 2024
@glemaitre
Copy link
Member Author

So from the discussion on the feedstock, it seems that this is a rather urgent fix to unblock the migration to NumPy 2.0 on the conda-forge side. I think that it makes sense to make a proper bug fix release (1.4.3) and I'll update the changelog accordingly.

@glemaitre glemaitre added the To backport PR merged in master that need a backport to a release branch defined based on the milestone. label May 16, 2024
@jeremiedbb
Copy link
Member

I find that it's a huge waste of time to make a 1.4.3 today or even maybe tomorrow while we'll release 1.5.0 on monday

@jeremiedbb
Copy link
Member

I tested locally on my windows machine and confirm that it fails without the fix and works with this fix

@jeremiedbb
Copy link
Member

Please add np.int64 to the list of dtypes in the parametrization of test_all_with_any_reduction_axis_1

@glemaitre
Copy link
Member Author

I find that it's a huge waste of time to make a 1.4.3 today or even maybe tomorrow while we'll release 1.5.0 on monday

I did not exactly the timeline for the major. But if we release on Monday, I agree.

@glemaitre
Copy link
Member Author

We can also argue that we should avoid releasing on Friday.

@jeremiedbb
Copy link
Member

We can also argue that we should avoid releasing on Friday.

That's why I said monday 😄. I aimed to create the release PR tomorrow and try to release on monday

@glemaitre glemaitre modified the milestones: 1.4.3, 1.5 May 16, 2024
@glemaitre glemaitre removed the To backport PR merged in master that need a backport to a release branch defined based on the milestone. label May 16, 2024
@glemaitre
Copy link
Member Author

@jeremiedbb I think this is fine to skip adding an entry in the changelog?

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

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.

LGTM

@thomasjpfan thomasjpfan merged commit 87ceec2 into scikit-learn:main May 17, 2024
30 of 31 checks passed
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request May 20, 2024
@jeremiedbb jeremiedbb mentioned this pull request May 20, 2024
14 tasks
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.

Issue with int32/int64 dtype with NumPy 2.0
3 participants