Skip to content

ci: pin numpy below 2.5 in the GPU test environment - #4313

Merged
TaiSakuma merged 1 commit into
scikit-hep:mainfrom
TaiSakuma:pin-numpy-gpu-ci
Aug 21, 2026
Merged

ci: pin numpy below 2.5 in the GPU test environment#4313
TaiSakuma merged 1 commit into
scikit-hep:mainfrom
TaiSakuma:pin-numpy-gpu-ci

Conversation

@TaiSakuma

Copy link
Copy Markdown
Member

The Run GPU Tests jobs fail on every PR since about 2026-08-15 (currently #4294 and #4312). The GPU environment is solved fresh from conda-forge with numpy unconstrained, and the solver now picks numpy 2.5.2. numba-cuda 0.30.4 registers an overload for np.row_stack unconditionally for numpy >= 2.0, but numpy 2.5 removed np.row_stack (deprecated since 2.0), so importing numba_cuda/numba/cuda/np/npyimpl.py raises AttributeError: module 'numpy' has no attribute 'row_stack' and the tests-cuda suite fails.

This PR constrains numpy to below 2.5 in two places:

  • .github/actions/setup-gpu-env/action.yml: added to the micromamba create-args, so the conda solver picks a consistent environment. This is the change that fixes CI.
  • requirements-test-gpu.txt: the same constraint for manual pip installs, which hit the same failure because the numba-cuda wheel does not cap numpy either. In CI this line is a no-op: the pip step finds the constraint already satisfied by the conda-installed numpy.

The pin is temporary. numba-cuda tracks numpy 2.5 support in NVIDIA/numba-cuda#907, and the candidate fix (NVIDIA/numba-cuda#916, mirroring the guard that numba 0.67.0 already ships) is unmerged as of this PR; the latest numba-cuda release, v0.30.4, predates it. Both files carry a TODO comment naming this removal condition.

After this merges, a CI re-run on the affected PRs picks up the fix without a rebase, because the pull_request merge ref includes main.

🤖 Generated with Claude Code

The GPU test jobs fail on every PR since the conda solve started
picking numpy 2.5.2: numba-cuda 0.30.4 registers an overload for
np.row_stack unconditionally for numpy >= 2.0, but numpy 2.5 removed
np.row_stack, so importing numba_cuda's numpy support raises
AttributeError and the tests-cuda suite fails.

Constrain numpy to <2.5 in the micromamba create-args (where the CI
environment is solved) and in requirements-test-gpu.txt (for manual
pip installs). Drop the pin when a numba-cuda release supports
numpy 2.5 (NVIDIA/numba-cuda#907); the candidate fix is
NVIDIA/numba-cuda#916, unmerged as of this commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the type/ci PR title type: ci (set automatically) label Aug 20, 2026
@TaiSakuma
TaiSakuma requested a review from ariostas August 20, 2026 23:52

@ariostas ariostas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @TaiSakuma! Yeah, we had to do the same for uproot

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.42%. Comparing base (9ef15a2) to head (2aaffa4).

Additional details and impacted files

@github-actions

Copy link
Copy Markdown

The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR4313

@TaiSakuma
TaiSakuma merged commit 4eaa930 into scikit-hep:main Aug 21, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/ci PR title type: ci (set automatically)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants