Skip to content

Commit

Permalink
Rebuild for & Support NumPy 2 (#16300)
Browse files Browse the repository at this point in the history
Part of issue: rapidsai/build-planning#38

Start building `cudf` with `numpy` version `2.0`. This remains compatible with `numpy` version `1.x` and `2.x`. Allows us to test building with `numpy` version `2.0` (and make sure we catch any issues that show up). Also relaxes the `numpy` `1.x` pin. Pulls in the RDFG changes that are rolling out for broader RAPIDS NumPy 2 support.

Authors:
  - https://github.com/jakirkham
  - Sebastian Berg (https://github.com/seberg)

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)
  - Ray Douglass (https://github.com/raydouglass)
  - James Lamb (https://github.com/jameslamb)

URL: #16300
  • Loading branch information
jakirkham authored Aug 24, 2024
1 parent 7ca6a8c commit 508bdea
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 21 deletions.
2 changes: 1 addition & 1 deletion ci/cudf_pandas_scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ IFS=',' read -r -a versions <<< "$output"

for version in "${versions[@]}"; do
echo "Installing pandas version: ${version}"
python -m pip install "pandas==${version}"
python -m pip install "numpy>=1.23,<2.0a0" "pandas==${version}"
python -m pytest -p cudf.pandas \
--cov-config=./python/cudf/.coveragerc \
--cov=cudf \
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencies:
- notebook
- numba>=0.57
- numpy
- numpy>=1.23,<2.0a0
- numpy>=1.23,<3.0a0
- numpydoc
- nvcc_linux-64=11.8
- nvcomp==3.0.6
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies:
- notebook
- numba>=0.57
- numpy
- numpy>=1.23,<2.0a0
- numpy>=1.23,<3.0a0
- numpydoc
- nvcomp==3.0.6
- nvtx>=0.2.1
Expand Down
6 changes: 2 additions & 4 deletions conda/recipes/cudf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ requirements:
- rapids-build-backend >=0.3.0,<0.4.0.dev0
- scikit-build-core >=0.10.0
- dlpack >=0.8,<1.0
# TODO: Change to `2.0` for NumPy 2
- numpy 1.23
- numpy 2.0
- pyarrow ==16.1.0.*
- libcudf ={{ version }}
- pylibcudf ={{ version }}
Expand All @@ -84,8 +83,7 @@ requirements:
- pandas >=2.0,<2.2.3dev0
- cupy >=12.0.0
- numba >=0.57
# TODO: Update `numpy` in `host` when dropping `<2.0a0`
- numpy >=1.23,<2.0a0
- numpy >=1.23,<3.0a0
- {{ pin_compatible('pyarrow', max_pin='x.x') }}
- libcudf ={{ version }}
- pylibcudf ={{ version }}
Expand Down
6 changes: 2 additions & 4 deletions conda/recipes/pylibcudf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ requirements:
- rapids-build-backend >=0.3.0,<0.4.0.dev0
- scikit-build-core >=0.10.0
- dlpack >=0.8,<1.0
# TODO: Change to `2.0` for NumPy 2
- numpy 1.23
- numpy 2.0
- pyarrow ==16.1.0.*
- libcudf ={{ version }}
- rmm ={{ minor_version }}
Expand All @@ -81,8 +80,7 @@ requirements:
- python
- typing_extensions >=4.0.0
- pandas >=2.0,<2.2.3dev0
# TODO: Update `numpy` in `host` when dropping `<2.0a0`
- numpy >=1.23,<2.0a0
- numpy >=1.23,<3.0a0
- {{ pin_compatible('pyarrow', max_pin='x.x') }}
- {{ pin_compatible('rmm', max_pin='x.x') }}
- fsspec >=0.6.0
Expand Down
8 changes: 3 additions & 5 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,9 @@ dependencies:
- &pyarrow_build pyarrow==16.1.0.*
- output_types: pyproject
packages:
# Hard pin the patch version used during the build.
# Hard pin the version used during the build.
# Sync with conda build constraint & wheel run constraint.
# TODO: Change to `2.0.*` for NumPy 2
- numpy==1.23.*
- numpy==2.0.*
build_python_libcudf:
common:
- output_types: [conda, requirements, pyproject]
Expand Down Expand Up @@ -605,8 +604,7 @@ dependencies:
- output_types: [conda, requirements, pyproject]
packages:
- fsspec>=0.6.0
# TODO: Update `numpy` in `build_python_common` when dropping `<2.0a0`
- numpy>=1.23,<2.0a0
- numpy>=1.23,<3.0a0
- pandas>=2.0,<2.2.3dev0
run_pylibcudf:
common:
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies = [
"fsspec>=0.6.0",
"libcudf==24.10.*,>=0.0.0a0",
"numba>=0.57",
"numpy>=1.23,<2.0a0",
"numpy>=1.23,<3.0a0",
"nvtx>=0.2.1",
"packaging",
"pandas>=2.0,<2.2.3dev0",
Expand Down Expand Up @@ -130,7 +130,7 @@ requires = [
"libcudf==24.10.*,>=0.0.0a0",
"librmm==24.10.*,>=0.0.0a0",
"ninja",
"numpy==1.23.*",
"numpy==2.0.*",
"pyarrow==16.1.0.*",
"pylibcudf==24.10.*,>=0.0.0a0",
"rmm==24.10.*,>=0.0.0a0",
Expand Down
2 changes: 1 addition & 1 deletion python/cudf_kafka/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ requires = [
"cmake>=3.26.4,!=3.30.0",
"cython>=3.0.3",
"ninja",
"numpy==1.23.*",
"numpy==2.0.*",
"pyarrow==16.1.0.*",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
2 changes: 1 addition & 1 deletion python/dask_cudf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies = [
"cudf==24.10.*,>=0.0.0a0",
"cupy-cuda11x>=12.0.0",
"fsspec>=0.6.0",
"numpy>=1.23,<2.0a0",
"numpy>=1.23,<3.0a0",
"pandas>=2.0,<2.2.3dev0",
"rapids-dask-dependency==24.10.*,>=0.0.0a0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
Expand Down
2 changes: 1 addition & 1 deletion python/pylibcudf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ requires = [
"libcudf==24.10.*,>=0.0.0a0",
"librmm==24.10.*,>=0.0.0a0",
"ninja",
"numpy==1.23.*",
"numpy==2.0.*",
"pyarrow==16.1.0.*",
"rmm==24.10.*,>=0.0.0a0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
Expand Down

0 comments on commit 508bdea

Please sign in to comment.