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

[BUG] Avoid out of bounds integers in tests #13301

Closed
vyasr opened this issue May 5, 2023 · 1 comment · Fixed by #13325
Closed

[BUG] Avoid out of bounds integers in tests #13301

vyasr opened this issue May 5, 2023 · 1 comment · Fixed by #13325
Assignees
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@vyasr
Copy link
Contributor

vyasr commented May 5, 2023

Describe the bug
A number of cudf tests create numpy or cupy arrays with data that is out of bounds for the specified dtype. Here is one easy example where 453 is larger than the largest representable uint8 (2^8=256) and so the result overflows. We should not be doing this. Not only is it bad practice, but numpy 1.24 has started warning about this behavior, so it will eventually be removed. Note that this is an important issue for us because we treat warnings as errors in our test suite, so fixing this bug is effectively a blocker for updating to a newer numpy version.

Steps/Code to reproduce bug
Installing numpy 1.24 into a conda environment with numba 0.56 is not possible because numba constrains the numpy version, and at present cudf is constrained to numba<0.57. However, practical support was added in #13271, so a reasonable environment may be created by removing the numba and numpy dependencies (https://github.com/rapidsai/cudf/blob/branch-23.06/conda/environments/all_cuda-118_arch-x86_64.yaml#L50) and then pip installing numba>=0.57 and numpy==1.24.3 into that environment. Building cudf in that environment will reproduce the issue.

Expected behavior
Test suite should pass

@vyasr vyasr added bug Something isn't working Needs Triage Need team to review and classify labels May 5, 2023
@vyasr
Copy link
Contributor Author

vyasr commented May 5, 2023

We introduced an upper bound to the numpy pinnings in #13289 in order to temporarily avoid this problem. However, we are working to resolve it ASAP and remove the pinning.

@shwina shwina added Python Affects Python cuDF API. and removed Needs Triage Need team to review and classify labels May 10, 2023
@rapids-bot rapids-bot bot closed this as completed in c3dd1d6 May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Affects Python cuDF API.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants