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

[python-package] NumPy 2.0 support #6454

Open
Tracked by #6439
jameslamb opened this issue May 15, 2024 · 1 comment · May be fixed by #6467
Open
Tracked by #6439

[python-package] NumPy 2.0 support #6454

jameslamb opened this issue May 15, 2024 · 1 comment · May be fixed by #6467
Assignees

Comments

@jameslamb
Copy link
Collaborator

Summary

numpy 2.0 is coming out soon, and has release candidates up.

We should test lightgbm against it, and if any changes are required, try to get them into the next release (#6439).

Motivation

numpy is a hard runtime dependency of lightgbm. It would not be a good experience for users if incompatibility with its new major version leads to needing to manually pin numpy<2 in their environments.

Description

At a minimum, we should manually test lightgbm against the numpy release candidate. See dmlc/treelite#560 for a migration guide.

It also would be great to set up CI that runs against nightlies of numpy, pandas, scikit-learn, and scipy, maybe following xarray's example: https://github.com/pydata/xarray/blob/31111b3afe44fd6f7dac363264e94186cc5168d2/.github/workflows/upstream-dev-ci.yaml

References

Links to other projects' upgrade and testing efforts: numpy/numpy#26191

@jameslamb jameslamb changed the title [python-package] Support NumPy 2.0 [python-package] NumPy 2.0 support May 15, 2024
@jameslamb jameslamb self-assigned this May 16, 2024
@jameslamb
Copy link
Collaborator Author

There will be at least one thing I know needs to change... np.array(..., copy=False) calls being changed to np.asarray(...). Reference: https://github.com/dmlc/treelite/pull/562/files#r1603610473

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

Successfully merging a pull request may close this issue.

1 participant