Skip to content

fix: cap pyarrow below 26 for the TensorFlow extras and release workflow - #493

Open
pang-wu wants to merge 1 commit into
ray-project:masterfrom
pang-wu:fix/pin-pyarrow-for-tensorflow-extra
Open

pang-wu wants to merge 1 commit into
ray-project:masterfrom
pang-wu:fix/pin-pyarrow-for-tensorflow-extra

Conversation

@pang-wu

@pang-wu pang-wu commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds pyarrow<26 to the tensorflow and tensorflow-gpu extras in python/setup.py, and pins pyarrow<26 in the PyPI release workflow.

Why is this change needed?

CI is currently failing on every PR (seen on #492, a Scala-only change) with:

python/raydp/tests/conftest.py:27: in <module>
    import raydp
...
E   ImportError: pyarrow requires NumPy 2.0 or newer, found 1.26.4

Root cause:

  • CI runs an unpinned pip install pyarrow, which now resolves to pyarrow 26.0.0. That release raises an ImportError unless NumPy >= 2.0 is installed, but its wheel metadata declares no NumPy dependency, so pip does not prevent the combination.
  • pip install dist/raydp-*.whl[tensorflow] then pulls in tensorflow>=2.15.1,<2.16, which requires numpy<2.0.0 and resolves to NumPy 1.26.4.
  • import raydp imports pyarrow, which fails.

This also affects users: pip install raydp[tensorflow] alongside pyarrow 26 gives a broken environment. Capping pyarrow in the extras fixes the cause rather than only CI. When the wheel is installed with [tensorflow], pip replaces an already-installed pyarrow 26 with 25.x.

pypi_release.yml installs the wheel without extras and pins numpy<1.24, so the extras change does not reach it; it gets its own pyarrow<26 pin.

Master CI last passed on f186842 (2026-09-11), so the break comes from an unpinned dependency changing, not from a code change.

Related Issue

None filed.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Test update
  • Refactoring
  • Build / CI / dependency change
  • Other

How was this tested?

Reproduced the failure locally (Python 3.11, throwaway venvs):

pyarrow numpy import pyarrow
23.0.1, 24.0.0, 25.0.1 1.26.4 OK
26.0.0 1.26.4 ImportError (same message as CI)
26.0.0 2.4.6 OK

Checked the fix with pip install --dry-run of a stand-in package with raydp's dependency shape (numpy, pyarrow>=4.0.1, extra tensorflow>=2.15.1,<2.16 + pyarrow<26) into a venv that already had pyarrow 26.0.0 and NumPy 2.4.6. pip chose pyarrow 25.0.1, NumPy 1.26.4 and TensorFlow 2.15.1.

I have not run the CI matrix or pytest python/raydp/tests/ against the built wheel; this PR's own CI run is the first full check.

Note: pypi_release.yml checks out the release tag, so this only helps releases tagged after it lands.

Checklist

  • I have added or updated tests if needed
  • I have updated documentation if needed
  • I have run relevant tests locally
  • I have checked that this change is backward compatible

pyarrow 26 raises an ImportError on import unless NumPy >= 2.0 is installed,
but its wheel metadata does not declare a NumPy dependency, so pip does not
prevent the combination. TensorFlow 2.15 requires numpy<2, so
`pip install raydp[tensorflow]` next to an unpinned pyarrow resolves to
pyarrow 26 + NumPy 1.26.4 and `import raydp` fails.

Add `pyarrow<26` to the tensorflow and tensorflow-gpu extras so pip resolves
a consistent set (pyarrow 25.x with NumPy 1.26.x). The PyPI release workflow
installs the wheel without extras and pins numpy<1.24, so pin pyarrow there
too.
@pang-wu
pang-wu requested a review from carsonwang October 28, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant