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 #38

Open
jakirkham opened this issue Apr 17, 2024 · 2 comments
Open

NumPy 2.0 support #38

jakirkham opened this issue Apr 17, 2024 · 2 comments
Assignees
Labels

Comments

@jakirkham
Copy link
Member

jakirkham commented Apr 17, 2024

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

Ecosystem support for NumPy 2.0 is being tracked in issue: numpy/numpy#26191

Also conda-forge is discussing how to support NumPy 2.0: conda-forge/conda-forge.github.io#1997

When building against NumPy 2.0, it is possible with default settings to build packages that are compatible with NumPy 1 & 2. Where NumPy will target the oldest NumPy version that was built for that Python version being targeted


Developed the following list by installing RAPIDS 24.04 and inspecting, which packages used NumPy. Specifically ran the commands below

conda install -n base conda-tree -y
conda create -n rapids-24.04 -c rapidsai -c conda-forge -c nvidia rapids=24.04 python=3.11 cuda-version=12.2 -y
conda tree -n rapids-24.04 whoneeds numpy

This generated a list of dependencies. Some of these were RAPIDS packages themselves. So removed those from the list. Also dropped some indirect dependencies of RAPIDS. Admittedly this can get a little subjective. Though tried to capture a sufficiently complete, though not overly detailed, picture


From this, have built the table below

Some versions have questions marks if...

  • The release is uncertain
  • There may be some lingering issues
  • It may have been fixed against an older NumPy 2, but hasn't been retested with RC1

Blank entries mean no information is known about those fields at this time

Package Supported Released Version Upstream issue/PR
Arrow Y Y 16.0.0 apache/arrow#39532
Bokeh Y Y 3.4.1 bokeh/bokeh#13835
Branca Y Y 0.7.2 python-visualization/branca#163
CuPy N N 14.0.0 cupy/cupy#8306
Dask Y? dask/dask#11066
Datashader holoviz/datashader#1324
folium Y Y? 0.16.0? python-visualization/folium#1937
GDAL Y Y 3.9.0 OSGeo/gdal#9751
HoloViews Y Y 1.18.1? holoviz/holoviews#5979
Hypothesis Y Y 6.100.2 HypothesisWorks/hypothesis#3955
imagecodecs cgohlke/imagecodecs#100
imageio imageio/imageio#1077
mapclassify Y Y 2.6.1? pysal/mapclassify#188
Matplotlib Y Y 3.8.4 matplotlib/matplotlib#26778
Numba Y RC 0.60.0rc1 numba/numba#9544
Pandas Y Y 2.2.2 pandas-dev/pandas#55519
PyTorch Y Y 2.3.0 pytorch/pytorch#107302
PyWavelets Y Y 1.6.0 PyWavelets/pywt#731
scikit-image Y Y 0.23.1 scikit-image/scikit-image#7282
scikit-learn Y Y 1.4.2 scikit-learn/scikit-learn#27075
SciPy Y Y 1.13.0 scipy/scipy#20375
Shapely Y Y 2.0.4? shapely/shapely#1972
TensorFlow End of May? tensorflow/tensorflow#67291
tifffile Y Y 2024.4.24 cgohlke/tifffile#252
treelite dmlc/treelite#560
Xarray pydata/xarray#8844
XGBoost Y dmlc/xgboost#10221

Note to editors: Also attaching the CSV file used to generate this table (as editing Markdown tables can be tricky 😅). Would suggest making any changes in the CSV file locally (with Excel or other). Then you can use prettytable (available on PyPI & Conda-forge) to generate Markdown with this code. The resulting content can be copy-pasted above. Can drag and drop the CSV file into this textbox to attach it

prettytable code:
import prettytable

with open("rapids_numpy_pkgs.csv", "r") as fh:
    t = prettytable.from_csv(fh, delimeter=",", lineterminator="\n")
    t.set_style(prettytable.MARKDOWN)
with open("rapids_numpy_pkgs.md", "w") as fh2:
    fh2.write(str(t))
@jameslamb
Copy link
Member

Thanks @jakirkham ! I think this is a great approach.

I looked through this list of dependencies today and can't think of any others or a different approach to identify them. And I checked the statuses of all the not-yet-released ones and don't see any changes.

@jakirkham
Copy link
Member Author

jakirkham commented May 16, 2024

Went through the project list again earlier today and also now

Main changes were the GDAL release went out

Also Numba RCs are available

Dask may work with NumPy 2, but needs reconfirmation

Added a better issue link for TensorFlow

Tried to also split apart when upstream has fixes (like Dask or XGBoost) from whether they are released. Hopefully that gives a bit more visibility into the state of NumPy 2 support

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

No branches or pull requests

2 participants