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

NumPy 2.0 support #560

Closed
jakirkham opened this issue Apr 24, 2024 · 4 comments · Fixed by #562
Closed

NumPy 2.0 support #560

jakirkham opened this issue Apr 24, 2024 · 4 comments · Fixed by #562

Comments

@jakirkham
Copy link

NumPy 2.0 is coming out soon ( numpy/numpy#24300 ). NumPy 2.0.0rc1 packages for conda & wheels came out 3 weeks back ( numpy/numpy#24300 (comment) )

To prepare for NumPy 2.0, it might be worthwhile to start testing against NumPy 2 in CI

NumPy has put out a migration guide. More details are in the release notes

If Treelite make use of NumPy's C API (and produces wheels that use it), having a release of Treelite with wheels built against NumPy 2.0.0rc1 would be helpful to ensure NumPy 1 & 2 compatible wheels (as wheels built against NumPy 1 won't be compatible with NumPy 2). More details in this NumPy 2 ABI doc

Also as NumPy is tracking ecosystem support for NumPy 2.0, it would be helpful to share Treelite current support status in issue (with any plans): numpy/numpy#26191

@jakirkham
Copy link
Author

cc @hcho3

@seberg
Copy link

seberg commented May 8, 2024

I have checked locally, and the only change necessary to make the tests pass is to change copy=False calls to np.array() to instead call np.asarray() and remove the copy=False.
The C-API is not used, so there is nothing to worry there but that Python change is very disruptive and requires a new release unfortunately.

@jameslamb
Copy link
Contributor

@seberg @hcho3 I'd be happy to make and test those changes if you'd like. I've been wanting to get a bit more familiar with treelite anyway.

@jakirkham
Copy link
Author

Looks like Philip gave you a +1

Would say go for it 🙂

Thanks James! 🙏

jameslamb added a commit to jameslamb/treelite that referenced this issue May 16, 2024
jameslamb added a commit to jameslamb/treelite that referenced this issue May 16, 2024
hcho3 pushed a commit that referenced this issue May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants