-
Notifications
You must be signed in to change notification settings - Fork 902
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
Add support for Python 3.11, require NumPy 1.23+ #15111
Changes from all commits
bf0de6c
29b8b63
0b75781
d89ae6d
f10f2ba
971ee7a
e2a6bda
e298c3a
37c675a
a8fd0d5
7310cd7
cc4d677
e299cea
72e8e29
1815ddc
7ac7fec
c1d0639
ba5e9dd
43b1283
f3f7d82
351890d
7fb5d39
a434cbd
016d1aa
6d4f1a9
2f0a8a8
631e13b
0ca1d9b
d7231a0
c36707a
dd013bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ requirements: | |
- scikit-build-core >=0.7.0 | ||
- setuptools | ||
- dlpack >=0.5,<0.6.0a0 | ||
- numpy 1.23 | ||
- pyarrow ==14.0.2.* | ||
- libcudf ={{ version }} | ||
- rmm ={{ minor_version }} | ||
|
@@ -83,7 +84,7 @@ requirements: | |
- pandas >=2.0,<2.2.2dev0 | ||
- cupy >=12.0.0 | ||
- numba >=0.57 | ||
- numpy >=1.21 | ||
- {{ pin_compatible('numpy', max_pin='x') }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Switch to using |
||
- {{ pin_compatible('pyarrow', max_pin='x') }} | ||
- libcudf ={{ version }} | ||
- {{ pin_compatible('rmm', max_pin='x.x') }} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -188,7 +188,6 @@ channels: | |
- rapidsai | ||
- rapidsai-nightly | ||
- dask/label/dev | ||
- pytorch | ||
- conda-forge | ||
- nvidia | ||
dependencies: | ||
|
@@ -258,13 +257,17 @@ dependencies: | |
- *cmake_ver | ||
- cython>=3.0.3 | ||
- *ninja | ||
- &numpy numpy>=1.21 | ||
# Hard pin the patch version used during the build. This must be kept | ||
# in sync with the version pinned in get_arrow.cmake. | ||
- pyarrow==14.0.2.* | ||
- output_types: conda | ||
packages: | ||
- scikit-build-core>=0.7.0 | ||
- output_types: pyproject | ||
packages: | ||
# Hard pin the patch version used during the build. | ||
# Sync with conda build constraint & wheel run constraint. | ||
- numpy==1.23.* | ||
Comment on lines
+266
to
+270
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the same NumPy pin the conda packages use to build. It is now used here to align the wheel packages |
||
- output_types: [requirements, pyproject] | ||
packages: | ||
- scikit-build-core[pyproject]>=0.7.0 | ||
|
@@ -488,15 +491,19 @@ dependencies: | |
py: "3.10" | ||
packages: | ||
- python=3.10 | ||
- matrix: | ||
py: "3.11" | ||
packages: | ||
- python=3.11 | ||
- matrix: | ||
packages: | ||
- python>=3.9,<3.11 | ||
- python>=3.9,<3.12 | ||
run_common: | ||
common: | ||
- output_types: [conda, requirements, pyproject] | ||
packages: | ||
- fsspec>=0.6.0 | ||
- *numpy | ||
- numpy>=1.23 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both conda & wheel packages now have the same lower bound on NumPy |
||
- pandas>=2.0,<2.2.2dev0 | ||
run_cudf: | ||
common: | ||
|
@@ -624,18 +631,17 @@ dependencies: | |
- output_types: pyproject | ||
packages: | ||
- msgpack | ||
- &tokenizers tokenizers==0.13.1 | ||
- &transformers transformers==4.24.0 | ||
- &tokenizers tokenizers==0.15.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've bumped tokenizers to 0.15.2 so we can get Python 3.11 binaries. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incompatible with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bumped transformers to 4.38.1. |
||
- &transformers transformers==4.38.1 | ||
- tzdata | ||
specific: | ||
- output_types: conda | ||
matrices: | ||
- matrix: | ||
arch: x86_64 | ||
packages: | ||
# Currently, CUDA builds of pytorch do not exist for aarch64. We require | ||
# version <1.12.0 because newer versions use nvidia::cuda-toolkit. | ||
- pytorch<1.12.0 | ||
# Currently, CUDA + aarch64 builds of pytorch do not exist on conda-forge. | ||
- pytorch>=2.1.0 | ||
# We only install these on x86_64 to avoid pulling pytorch as a | ||
# dependency of transformers. | ||
- *tokenizers | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2019-2023, NVIDIA CORPORATION. | ||
# Copyright (c) 2019-2024, NVIDIA CORPORATION. | ||
|
||
import types | ||
from contextlib import ExitStack as does_not_raise | ||
|
@@ -193,10 +193,11 @@ def test_cuda_array_interface_pytorch(): | |
|
||
assert_eq(got, cudf.Series(buffer, dtype=np.bool_)) | ||
|
||
index = cudf.Index([], dtype="float64") | ||
tensor = torch.tensor(index) | ||
got = cudf.Index(tensor) | ||
assert_eq(got, index) | ||
# TODO: This test fails with PyTorch 2. Is it still expected to be valid? | ||
# index = cudf.Index([], dtype="float64") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I pushed a change 2f0a8a8 to unblock CI, and also rolled it out to a separate PR #15188. See my notes there for discussion and next steps. https://github.com/rapidsai/cudf/pull/15188/files#r1506969204 I would like to merge this test change as-is, to keep the main goal of Python 3.11 support moving. We can handle any further discussion of the issue in https://github.com/rapidsai/cudf/pull/15188/files#r1506969204. |
||
# tensor = torch.tensor(index) | ||
# got = cudf.Index(tensor) | ||
# assert_eq(got, index) | ||
|
||
index = cudf.core.index.RangeIndex(start=0, stop=100) | ||
tensor = torch.tensor(index) | ||
|
@@ -212,7 +213,7 @@ def test_cuda_array_interface_pytorch(): | |
|
||
str_series = cudf.Series(["a", "g"]) | ||
|
||
with pytest.raises(NotImplementedError): | ||
with pytest.raises(AttributeError): | ||
str_series.__cuda_array_interface__ | ||
|
||
cat_series = str_series.astype("category") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As NumPy is used at build time, this now adds it to
requirements/host