Skip to content

[ci][deps] Unify requirements_compiled across Python versions - #64257

Merged
elliot-barn merged 12 commits into
masterfrom
elliot-barn-unify-requirements-compiled
Jul 13, 2026
Merged

elliot-barn merged 12 commits into
masterfrom
elliot-barn-unify-requirements-compiled

Conversation

@elliot-barn

Copy link
Copy Markdown
Collaborator

Collapse the separate py3.13 dependency lock into the base lock so there is a
single source requirement set and a single compiled lock shared across all
Python versions. The python/requirements/py313/** override directories are
promoted onto the canonical requirement paths, the duplicate compile_313
pipeline is removed, and requirements_compiled_py3.13.txt becomes a symlink to
requirements_compiled.txt (joining 3.10/3.11/3.12). The py3.14 lock is left
untouched.

Because the old base lock (py3.10/3.11/3.12) and the py3.13 lock were never
pin-aligned, unifying them bumps ~266 package versions for py3.10/3.11/3.12
up to the already-vetted py3.13 versions.

Why

We maintained two parallel dependency stacks: the canonical requirement files +
requirements_compiled.txt (consumed by py3.10/3.11/3.12), and a duplicate
python/requirements/py313/** set + requirements_compiled_py3.13.txt +
compile_313_pip_dependencies. The two had drifted, and most CI already ran
against the py3.13 lock. Unifying removes the duplication and the second compile
job, and makes every Python version resolve from one source of truth.

What changed

Source + compile path

  • Promote python/requirements/py313/** and python/requirements/ml/py313/**
    onto the canonical paths (version markers preserved, so py3.10 still resolves
    its older pins where needed). Delete the py313/ directories.
  • ci.sh: fold ml-requirements.txt + third_party.txt into
    compile_pip_dependencies; delete compile_313_pip_dependencies.
  • .buildkite/dependencies.rayci.yml: drop the pip_compile_313 step.
  • Repoint py313/ source paths to canonical in the raydepsets configs and the
    pytorch-lightning pre-hook.
  • Regenerate requirements_compiled.txt; symlink requirements_compiled_py3.13.txt
    to it.

Generated locks

  • Regenerate all python/deplocks/**. Image/base locks (ray_img, base_deps,
    base_extra, base_extra_testdeps, base_slim) carry the version bumps; the CI
    test locks change comments only (they already used the py3.13 lock).

Release (byod)

  • Bump the byod hard-pins that are resolved against the unified lock:
    tensorboardx 2.6.2.2 → 2.6.5; torch 2.7.0 → 2.9.0 (with triton
    3.3.0 → 3.5.0); deepspeed 0.17.2 → 0.18.9. Regenerate byod locks.

Impact

  • py3.10/3.11/3.12 Docker images rebuild with the refreshed dependency set
    (~266 version bumps).
  • CI test environments: no version changes (comment-only lock diffs).
  • Release tests on py3.10/3.11/3.12 run on the bumped images; the ML/GPU
    py3.10 tests see the most significant changes (torch 2.7→2.9). cu130 torch is
    unchanged (separate layer). py3.13/py3.14 tests are unaffected.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

The number of changes in this pull request is too large for Gemini Code Assist to generate a review.

elliot-barn and others added 3 commits June 22, 2026 18:57
…e compile path

Promote the python/requirements/py313/** and python/requirements/ml/py313/**
override files onto the canonical requirement paths (markers preserved), so a
single compile_pip_dependencies produces requirements_compiled.txt for all
Python versions. requirements_compiled_py3.13.txt now symlinks to it (joining
3.10/3.11/3.12); py3.14 lock is unchanged.

- Move 11 ml/py313 files + py313/test-requirements.txt onto canonical paths;
  add ml/{ml-requirements,lightning1,third_party,torchft}.txt; delete py313 dirs.
- ci.sh: add ml-requirements.txt + third_party.txt to compile_pip_dependencies;
  remove compile_313_pip_dependencies.
- .buildkite/dependencies.rayci.yml: drop the pip_compile_313 step.
- Repoint py313/ source paths to canonical in 9 depset configs + the
  strip-pytorch-lightning pre-hook (constraint /tmp paths resolve via symlink).
- Regenerate requirements_compiled.txt on py3.11: pin-identical to the prior
  py3.13 lock (comment paths now canonical). This bumps ~266 py3.10/3.11/3.12
  package versions to the py313-refreshed set.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
Output of `raydepsets build --all-configs` after the source unification.

- Image/base locks (ray_img/, base_deps/, base_extra/, base_extra_testdeps/,
  base_slim/) for py3.10/3.11/3.12 carry the ~266 py313 pin bumps (these
  constrain against the per-version base lock, which is now the unified lock).
- ci/* test deplocks change comments only (0 pin changes) — they already
  constrained against the py3.13 lock, whose content is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
The cpu/gpu/ml byod 3.10 requirement inputs are blended into the
base_extra_testdeps locks, which are constrained against the unified lock, so
their hard pins had to move to match (otherwise raydepsets fails to resolve):

- requirements_byod_3.10.in / requirements_byod_gpu_3.10.in: tensorboardx
  2.6.2.2 -> 2.6.5
- requirements_ml_byod_3.10.in: torch 2.7.0 -> 2.9.0, triton 3.3.0 -> 3.5.0
  (torch 2.9 requires triton 3.5), deepspeed 0.17.2 -> 0.18.9

Regenerated byod locks. NOTE: cu130 torch is unchanged (stays 2.9.1+cu130) —
its torch layer is constrained against the torch-less cu130 base lock, not the
unified lock; cu130 locks change only via transitive base bumps.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn force-pushed the elliot-barn-unify-requirements-compiled branch from d3ba89e to a245666 Compare June 22, 2026 18:57
@elliot-barn elliot-barn changed the title [ci][deps] unify requirements compiled [ci][deps] Unify requirements_compiled across Python versions Jun 22, 2026
@elliot-barn elliot-barn added the go add ONLY when ready to merge, run all tests label Jun 22, 2026
@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core devprod labels Jun 22, 2026
elliot-barn and others added 2 commits June 22, 2026 21:57
Resolve conflicts from the requirements-unification:
- Fold master's new zarr/numcodecs dual-marker pins into the canonical
  python/requirements/ml/data-test-requirements.txt (master added them to the
  now-removed py313/ override file).
- Keep requirements_compiled_py3.13.txt as a symlink to the unified lock.
- Regenerate requirements_compiled.txt (adds zarr 2.18.7 / numcodecs 0.15.1 for
  py3.11+, asciitree) and all deplocks via raydepsets; `--all-configs --check`
  passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn requested a review from a team as a code owner June 23, 2026 03:04
elliot-barn and others added 3 commits June 23, 2026 20:01
s3torchconnector imports tenacity at module load but does not declare it
as a dependency. tenacity was only being pulled transitively via pyiceberg,
which is not present in the doctest/ml depsets, so the py313 unification
recompile dropped it and broke the //doc:source/train/doc_code/checkpoints
doc test with ModuleNotFoundError: No module named 'tenacity'.

Pin tenacity==9.1.4 next to s3torchconnector in train-test-requirements.txt
and recompile the affected depsets.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
Pinning tenacity in train-test-requirements.txt made tenacity a direct
requirement, so its `# via` provenance in the base compiled lock now lists
train-test-requirements.txt alongside pyiceberg. Regenerate via
ci.sh compile_pip_dependencies output to satisfy the pip-compile check.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
Resolve conflicts: keep requirements_compiled_py3.13.txt as a symlink to
requirements_compiled.txt, and accept removal of python/requirements/ml/py313/
data-requirements.txt and rllib-test-requirements.txt (their changes already
live in the unified python/requirements/ml/ files).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn requested review from a team as code owners July 2, 2026 00:12
@elliot-barn
elliot-barn force-pushed the elliot-barn-unify-requirements-compiled branch from 5e8c299 to da30e5b Compare July 10, 2026 09:27
…raints

byod_rllib.sh hand-pinned its packages, which drifted from the compiled
dependency set. On this branch requirements_compiled moved to numpy 2.2.6
and opencv-python-headless 4.10.0.84, but byod_rllib.sh still installed the
numpy-1-ABI opencv-python-headless 4.9.0.80. That wheel crashes on import
under numpy 2, killing the RLlib env-runner worker so the env is never
constructed (SingleAgentEnvRunner "doesn't have an env"), which failed
rllib_learning_tests_pong_appo_torch.

Install everything except torch/torchvision under
-c $HOME/requirements_compiled.txt so the byod image tracks the compiled
set and cannot drift again. torch/torchvision stay a separate unconstrained
install because they come from the cu128 wheel index and intentionally
differ from requirements_compiled.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn force-pushed the elliot-barn-unify-requirements-compiled branch from da30e5b to 959b54e Compare July 10, 2026 20:19
@elliot-barn
elliot-barn merged commit fed12ca into master Jul 13, 2026
3 checks passed
@elliot-barn
elliot-barn deleted the elliot-barn-unify-requirements-compiled branch July 13, 2026 23:23
ArturNiederfahrenhorst added a commit to shorbaji/ray that referenced this pull request Jul 14, 2026
Brings the branch up to current master and resolves the dependency-layer
conflicts introduced by ray-project#64257 ("unify requirements_compiled across Python
versions"):

- py313/data-test-requirements.txt: accepted master's deletion (the whole
  python/requirements/ml/py313/ tree was removed); the lerobot gating moved
  into the canonical data-test-requirements.txt.
- data-test-requirements.txt: kept master's file and appended the lerobot block
  with torchcodec<0.10 (torch is still pinned 2.9.0, so the ABI cap still holds).
- Regenerated the data depset locks via raydepsets; the py3.12 data locks now
  resolve lerobot==0.6.0 / torchcodec==0.9.1 / av==18.0.0. No other locks change
  vs master.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
ans9868 added a commit to ans9868/ray that referenced this pull request Jul 15, 2026
elliot-barn added a commit that referenced this pull request Jul 18, 2026
Three independent Windows-only breaks, all verified against postmerge
builds 18675/18684:

- generator_waiter_test.cc: MSVC C2131 — a by-ref-captured constexpr
  local used as an array bound inside a lambda is not a constant
  expression to MSVC. Make the test constants static constexpr. Broken
  since #64383.

- test_streaming_generator: move from the medium to the large shard.
  Passing Windows runs take ~296s against the moderate 300s limit
  (build 18675: PASSED in 296.2s; build 18684: TIMEOUT at 300s in 2/2
  attempts, mid-suite at test 21-22 of 23) — it is slow, not hung.

- test_runtime_env_uv::test_uv_with_version_and_check: use
  importlib.metadata instead of pkg_resources. virtualenv >= 21 (bumped
  in #64257) no longer seeds setuptools into the venvs Ray creates, and
  setuptools >= 83 removed pkg_resources entirely, so the test must not
  depend on it regardless of the virtualenv pin decision in #64739.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
elliot-barn added a commit that referenced this pull request Jul 19, 2026
…ile error, streaming-generator timeout, uv test (#64865)

## Why are these changes needed?

Fixes all four Windows test failures on master postmerge (builds
18675/18684). Windows tests run only on release-automation-triggered
postmerge builds, so these landed silently.

### 1. `test_experimental_collective` — torch gloo broken on Windows
(pin torch 2.7.0)

Fails since #64257 bumped torch `2.7.0 → 2.9.0`:

```
RuntimeError: makeDeviceForHostname(): unsupported gloo device
```

torch 2.8/2.9 stock Windows wheels are built **without libuv**, and
gloo's TCP transport is Linux-only, so `torch.distributed`'s gloo
backend cannot initialize at all on Windows (pytorch/pytorch#150381).
Fixed upstream via pytorch/gloo#472, shipped in torch **2.10** and
explicitly not cherry-picked into 2.9.x. Ray's own postmerge bisection
(builds 18569–18574) confirmed #64257 as first-bad; Linux/macOS are
unaffected.

The windowsbuild image previously pip-installed its test deps
constrained by `requirements_compiled.txt` directly, so there was no
depset to override. This brings it under raydepsets
(`ci_windows.depsets.yaml`), mirroring the relax/expand pattern from
`ci_data.depsets.yaml`:

- `windows_tests_ci_depset_310` — compile `requirements.txt` +
`test-requirements.txt` + `dl-cpu-requirements.txt` for windows/py3.10
constrained by `requirements_compiled` (same inputs `build_base.sh`
used).
- `relaxed_windows_tests_ci_depset_310` — relax torch, torchvision, and
the ABI-coupled PyG binaries.
- `windows_tests_torch27_ci_depset_310` — expand with
`python/requirements/windows-requirements.txt`: `torch==2.7.0`,
`torchvision==0.22.0`, and the `+pt27cpu` PyG local builds (explicit
local tags because the relaxed lock still emits the torch-2.9.0
find-links and unsafe-best-match would otherwise re-pick `+pt29cpu`).

`build_base.sh` installs the final lock hash-stripped with `--no-deps`
(same pattern as `ci/ray_ci/macos/macos_ci.sh`). The wanda srcs now key
on the lock instead of the four requirements files. The final lock
differs from the base resolution by exactly the six torch packages.
Windows **wheel** builds are unaffected (hermetic `uv run` env in
`build-wheel-windows.sh`). Delete `windows-requirements.txt` and the
torch2.7 depsets once the repo-wide torch pin reaches ≥2.10.

### 2. `generator_waiter_test` — MSVC C2131 compile error (cpp tests
job)

Broken since #64383: a by-ref-captured `constexpr` local used as an
array bound inside a lambda is not a constant expression to MSVC. Make
the test constants `static constexpr`.

### 3. `test_streaming_generator` — timeout, moved to the large shard

Passing Windows runs take ~296s against the moderate (300s) limit (build
18675: PASSED in 296.2s; build 18684: TIMEOUT at 300s in 2/2 attempts,
dying mid-suite at test 21–22 of 23) — legitimately slow, not hung. The
Windows job selects `//python/ray/tests/...` by path, so the size-tag
move keeps Windows coverage.

### 4. `test_runtime_env_uv::test_uv_with_version_and_check` —
pkg_resources removed

Use `importlib.metadata` instead of `pkg_resources`: virtualenv ≥21
(bumped in #64257) no longer seeds setuptools into the venvs Ray
creates, and setuptools ≥83 removed `pkg_resources` entirely, so the
test must not depend on it regardless of the virtualenv pin decision in
#64739. Ray's non-test code has zero pkg_resources usage.

## Related issue number

Root causes: upstream pytorch/pytorch#150381 (item 1); regressions
introduced by #64257 (items 1, 4) and #64383 (item 2).

## Checks

- Not a duplicate: searched open PRs — none address the Windows
gloo/torch failure, the MSVC break, or the streaming-generator timeout.
#64739 (virtualenv pin) is complementary: item 4 here makes the test
independent of that decision.
- Tests run locally: `bazel run //ci/raydepsets:raydepsets -- build
ci/raydepsets/configs/ci_windows.depsets.yaml` (all depsets compile;
final lock pins `torch==2.7.0+cpu`, diff vs base is exactly the six
torch packages); `bazel query` confirms `test_streaming_generator` is a
unique target with `size = large`; `pre-commit` passed on all changed
files. Windows image build + test runs can only be validated in CI —
watch `windowsbuild` (cold rebuild expected) and the Windows cpp/python
test jobs on this PR.
- AI assistance was used for this change (diagnosis and implementation);
reviewed and submitted by a human.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
elliot-barn added a commit that referenced this pull request Jul 29, 2026
…ed (#64736)

Following #64257, the separate py3.13 dependency lock and its compile
path were removed: compile_313_pip_dependencies is gone, the
python/requirements/py313/** and ml/py313/** override dirs were promoted
onto the canonical paths, and requirements_compiled_py3.10-3.13.txt are
now symlinks to the single requirements_compiled.txt.

Remove the now-obsolete py3.13-specific references from the skill:
- Drop the compile_313_pip_dependencies function/invocation/relock
steps.
- Describe the single unified lock and its symlinks.
- Point the marker-preservation and add-dependency guidance at the
canonical python/requirements/ml/** and test-requirements paths.

The raydepsets py313 build_arg_sets / lock-name examples are kept since
raydepsets still builds a per-version py3.13 lock.

---------

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: Elliot Barnwell <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Artimislyy pushed a commit to Artimislyy/ray that referenced this pull request Aug 11, 2026
…ed (ray-project#64736)

Following ray-project#64257, the separate py3.13 dependency lock and its compile
path were removed: compile_313_pip_dependencies is gone, the
python/requirements/py313/** and ml/py313/** override dirs were promoted
onto the canonical paths, and requirements_compiled_py3.10-3.13.txt are
now symlinks to the single requirements_compiled.txt.

Remove the now-obsolete py3.13-specific references from the skill:
- Drop the compile_313_pip_dependencies function/invocation/relock
steps.
- Describe the single unified lock and its symlinks.
- Point the marker-preservation and add-dependency guidance at the
canonical python/requirements/ml/** and test-requirements paths.

The raydepsets py313 build_arg_sets / lock-name examples are kept since
raydepsets still builds a per-version py3.13 lock.

---------

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: Elliot Barnwell <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…project#64257)

Collapse the separate py3.13 dependency lock into the base lock so there
is a
**single source requirement set and a single compiled lock** shared
across all
Python versions. The `python/requirements/py313/**` override directories
are
promoted onto the canonical requirement paths, the duplicate
`compile_313`
pipeline is removed, and `requirements_compiled_py3.13.txt` becomes a
symlink to
`requirements_compiled.txt` (joining 3.10/3.11/3.12). The py3.14 lock is
left
untouched.

Because the old base lock (py3.10/3.11/3.12) and the py3.13 lock were
never
pin-aligned, unifying them bumps **~266 package versions** for
py3.10/3.11/3.12
up to the already-vetted py3.13 versions.

## Why

We maintained two parallel dependency stacks: the canonical requirement
files +
`requirements_compiled.txt` (consumed by py3.10/3.11/3.12), and a
duplicate
`python/requirements/py313/**` set + `requirements_compiled_py3.13.txt`
+
`compile_313_pip_dependencies`. The two had drifted, and most CI already
ran
against the py3.13 lock. Unifying removes the duplication and the second
compile
job, and makes every Python version resolve from one source of truth.

## What changed

**Source + compile path**
- Promote `python/requirements/py313/**` and
`python/requirements/ml/py313/**`
onto the canonical paths (version markers preserved, so py3.10 still
resolves
  its older pins where needed). Delete the `py313/` directories.
- `ci.sh`: fold `ml-requirements.txt` + `third_party.txt` into
  `compile_pip_dependencies`; delete `compile_313_pip_dependencies`.
- `.buildkite/dependencies.rayci.yml`: drop the `pip_compile_313` step.
- Repoint `py313/` source paths to canonical in the raydepsets configs
and the
  pytorch-lightning pre-hook.
- Regenerate `requirements_compiled.txt`; symlink
`requirements_compiled_py3.13.txt`
  to it.

**Generated locks**
- Regenerate all `python/deplocks/**`. Image/base locks (ray_img,
base_deps,
base_extra, base_extra_testdeps, base_slim) carry the version bumps; the
CI
  test locks change comments only (they already used the py3.13 lock).

**Release (byod)**
- Bump the byod hard-pins that are resolved against the unified lock:
  `tensorboardx` 2.6.2.2 → 2.6.5; `torch` 2.7.0 → 2.9.0 (with `triton`
  3.3.0 → 3.5.0); `deepspeed` 0.17.2 → 0.18.9. Regenerate byod locks.

## Impact

- **py3.10/3.11/3.12 Docker images** rebuild with the refreshed
dependency set
  (~266 version bumps).
- **CI test environments**: no version changes (comment-only lock
diffs).
- **Release tests** on py3.10/3.11/3.12 run on the bumped images; the
ML/GPU
py3.10 tests see the most significant changes (torch 2.7→2.9). cu130
torch is
  unchanged (separate layer). py3.13/py3.14 tests are unaffected.

---------

Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: 400Ping <[email protected]>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…ile error, streaming-generator timeout, uv test (ray-project#64865)

## Why are these changes needed?

Fixes all four Windows test failures on master postmerge (builds
18675/18684). Windows tests run only on release-automation-triggered
postmerge builds, so these landed silently.

### 1. `test_experimental_collective` — torch gloo broken on Windows
(pin torch 2.7.0)

Fails since ray-project#64257 bumped torch `2.7.0 → 2.9.0`:

```
RuntimeError: makeDeviceForHostname(): unsupported gloo device
```

torch 2.8/2.9 stock Windows wheels are built **without libuv**, and
gloo's TCP transport is Linux-only, so `torch.distributed`'s gloo
backend cannot initialize at all on Windows (pytorch/pytorch#150381).
Fixed upstream via pytorch/gloo#472, shipped in torch **2.10** and
explicitly not cherry-picked into 2.9.x. Ray's own postmerge bisection
(builds 18569–18574) confirmed ray-project#64257 as first-bad; Linux/macOS are
unaffected.

The windowsbuild image previously pip-installed its test deps
constrained by `requirements_compiled.txt` directly, so there was no
depset to override. This brings it under raydepsets
(`ci_windows.depsets.yaml`), mirroring the relax/expand pattern from
`ci_data.depsets.yaml`:

- `windows_tests_ci_depset_310` — compile `requirements.txt` +
`test-requirements.txt` + `dl-cpu-requirements.txt` for windows/py3.10
constrained by `requirements_compiled` (same inputs `build_base.sh`
used).
- `relaxed_windows_tests_ci_depset_310` — relax torch, torchvision, and
the ABI-coupled PyG binaries.
- `windows_tests_torch27_ci_depset_310` — expand with
`python/requirements/windows-requirements.txt`: `torch==2.7.0`,
`torchvision==0.22.0`, and the `+pt27cpu` PyG local builds (explicit
local tags because the relaxed lock still emits the torch-2.9.0
find-links and unsafe-best-match would otherwise re-pick `+pt29cpu`).

`build_base.sh` installs the final lock hash-stripped with `--no-deps`
(same pattern as `ci/ray_ci/macos/macos_ci.sh`). The wanda srcs now key
on the lock instead of the four requirements files. The final lock
differs from the base resolution by exactly the six torch packages.
Windows **wheel** builds are unaffected (hermetic `uv run` env in
`build-wheel-windows.sh`). Delete `windows-requirements.txt` and the
torch2.7 depsets once the repo-wide torch pin reaches ≥2.10.

### 2. `generator_waiter_test` — MSVC C2131 compile error (cpp tests
job)

Broken since ray-project#64383: a by-ref-captured `constexpr` local used as an
array bound inside a lambda is not a constant expression to MSVC. Make
the test constants `static constexpr`.

### 3. `test_streaming_generator` — timeout, moved to the large shard

Passing Windows runs take ~296s against the moderate (300s) limit (build
18675: PASSED in 296.2s; build 18684: TIMEOUT at 300s in 2/2 attempts,
dying mid-suite at test 21–22 of 23) — legitimately slow, not hung. The
Windows job selects `//python/ray/tests/...` by path, so the size-tag
move keeps Windows coverage.

### 4. `test_runtime_env_uv::test_uv_with_version_and_check` —
pkg_resources removed

Use `importlib.metadata` instead of `pkg_resources`: virtualenv ≥21
(bumped in ray-project#64257) no longer seeds setuptools into the venvs Ray
creates, and setuptools ≥83 removed `pkg_resources` entirely, so the
test must not depend on it regardless of the virtualenv pin decision in
ray-project#64739. Ray's non-test code has zero pkg_resources usage.

## Related issue number

Root causes: upstream pytorch/pytorch#150381 (item 1); regressions
introduced by ray-project#64257 (items 1, 4) and ray-project#64383 (item 2).

## Checks

- Not a duplicate: searched open PRs — none address the Windows
gloo/torch failure, the MSVC break, or the streaming-generator timeout.
ray-project#64739 (virtualenv pin) is complementary: item 4 here makes the test
independent of that decision.
- Tests run locally: `bazel run //ci/raydepsets:raydepsets -- build
ci/raydepsets/configs/ci_windows.depsets.yaml` (all depsets compile;
final lock pins `torch==2.7.0+cpu`, diff vs base is exactly the six
torch packages); `bazel query` confirms `test_streaming_generator` is a
unique target with `size = large`; `pre-commit` passed on all changed
files. Windows image build + test runs can only be validated in CI —
watch `windowsbuild` (cold rebuild expected) and the Windows cpp/python
test jobs on this PR.
- AI assistance was used for this change (diagnosis and implementation);
reviewed and submitted by a human.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
Signed-off-by: 400Ping <[email protected]>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…ed (ray-project#64736)

Following ray-project#64257, the separate py3.13 dependency lock and its compile
path were removed: compile_313_pip_dependencies is gone, the
python/requirements/py313/** and ml/py313/** override dirs were promoted
onto the canonical paths, and requirements_compiled_py3.10-3.13.txt are
now symlinks to the single requirements_compiled.txt.

Remove the now-obsolete py3.13-specific references from the skill:
- Drop the compile_313_pip_dependencies function/invocation/relock
steps.
- Describe the single unified lock and its symlinks.
- Point the marker-preservation and add-dependency guidance at the
canonical python/requirements/ml/** and test-requirements paths.

The raydepsets py313 build_arg_sets / lock-name examples are kept since
raydepsets still builds a per-version py3.13 lock.

---------

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: Elliot Barnwell <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: 400Ping <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…ed (ray-project#64736)

Following ray-project#64257, the separate py3.13 dependency lock and its compile
path were removed: compile_313_pip_dependencies is gone, the
python/requirements/py313/** and ml/py313/** override dirs were promoted
onto the canonical paths, and requirements_compiled_py3.10-3.13.txt are
now symlinks to the single requirements_compiled.txt.

Remove the now-obsolete py3.13-specific references from the skill:
- Drop the compile_313_pip_dependencies function/invocation/relock
steps.
- Describe the single unified lock and its symlinks.
- Point the marker-preservation and add-dependency guidance at the
canonical python/requirements/ml/** and test-requirements paths.

The raydepsets py313 build_arg_sets / lock-name examples are kept since
raydepsets still builds a per-version py3.13 lock.

---------

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: Elliot Barnwell <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
elliot-barn added a commit that referenced this pull request Oct 9, 2026
…ead of by hand (#66795)

## Why

`python/requirements_compiled_py3.14.txt` is edited by hand. It copied
most pins from the py3.11 lock, and only six were ever bumped for 3.14.
About 25 other pins have no cp314 wheel (jax 0.4.33, h5py 3.12.1,
pymongo 4.3.2, tensorflow 2.20, ...), and transformers was still at
4.36.2. Nobody noticed, because a constraints file only gets tested when
some image actually requests a package. Once #65909 made the ray-torch
py3.14 depset constrain on this file, the nightly `ray-torch.py3.14`
build failed on `tokenizers==0.15.2` (no cp314 wheel).

**Not a duplicate:** #66731 fixes the same failure with a uv
`--override` file. An override replaces *every* requirement on a
package, including the version bounds other packages declare, so
conflicts compile cleanly. Its generated file pins `s3torchconnector`
1.4.3 with `s3torchconnectorclient` 1.5.0, `numcodecs` 0.17 against
zarr's `<0.16`, and `numpy` 2.3.3 against lerobot's `<2.3`. This PR
takes a different approach and uses no overrides, so uv enforces every
dependent's bounds.

## What changed

- **`ci/ci.sh compile_pip_dependencies_py314`** compiles the 3.14 file
on its own, like `compile_313_pip_dependencies` did before #64257. It
uses uv 0.9.26 (the version bazel pins) with `--python-version 3.14`,
from the same source files as `compile_pip_dependencies`.
- **Wheels only** (`--only-binary :all:`), except 12 packages that ship
only an sdist for every Python version, so building them isn't a 3.14
regression.
  - Ray images are glibc 2.35, so it targets `manylinux_2_35`.
- **Where a shared pin has no cp314 wheel, the source file gates it.**
The pinned line gets `python_version < '3.14'`. Where 3.14 needs a
replacement, an unpinned `python_version >= '3.14'` line is added and
the resolver picks the version. This replaces the `py313/` directory
copies 3.13 used to have.
- **Source builds:** the 3.14 compile uses `--only-binary :all:`, so a
package without a cp314 wheel fails the compile instead of quietly
building from source. The exceptions are packages that never ship a
wheel on any Python: sdist-only releases (crcmod, gsutil, ...) and
`hyperopt`, which `tune-requirements.txt` pins to a git commit. Every
Python builds those from source; the 3.10–3.13 compile just doesn't
forbid it.
- **The dependencies pipeline now fails if
`requirements_compiled_py3.14.txt` is out of date**, the same check it
already runs on the main file.
- **`requirements_compiled.txt`:** marker-only changes (`python_version
< "3.14"`).
- **Non-3.14 deplocks:** 38 files change, marker annotations only. No
versions change.
- Docs: `dependency-management.md` gets a Python 3.14 section.

## 3.14 decisions (source files)

| Change | Packages |
|---|---|
| Own pin on 3.14 (shared pin has no cp314 wheel; a `>= '3.14'` line
pins the version that resolved) | numpy, numba, llvmlite, cupy-cuda12x,
cffi, jax/jaxlib, h5py, mujoco, ale-py, pymunk, open-spiel, pymongo,
tensordict, crc32c, pyiceberg, s3torchconnector, pytest |
| Not installed on 3.14 (no usable release) | tensorflow, tf-keras,
torchtext, pygame, minigrid, supersuit, tinyscaler, datasketches,
fastrlock (cupy 14 dropped it), raydp (pins netifaces 0.11.0) |
| Not installed on 3.14 (blocked by a dependency) | zarr + numcodecs
(every zarr 2.x needs numcodecs <0.16; none has cp314 wheels), lerobot
(every release caps numpy <2.3) |

Notes for reviewers:
- **Versions follow the existing 3.14 file:** uv keeps a pin from it
whenever that pin still installs. numpy 2.3.3, numba 0.65.0, llvmlite
0.47.0, cupy 14.0.1 and pytest 8.3.3 stay where they were. Pins that had
to move go to the latest release, e.g. transformers 5.19.0 (3.11 has
5.11.0) and jax 0.11.2.
- **pytest 8.3.3** isn't needed for the reason #64750 gave: pytest 7.4.4
only uses `ast.Str` below Python 3.8. It's needed because locust ≥2.40
requires it, and older locust caps `gevent<25.8.1`, which has no cp314
wheel.
- **urllib3 goes from 2.0.7 back to 1.26.20.** #64750 pinned 2.0.7 by
hand with no stated reason. 1.26.20 imports and makes requests on
CPython 3.14 with DeprecationWarnings turned into errors.
- **Marker gotcha:** pip-compile writes the marker of the *last* source
line, in compile order, that has a marker matching py3.11. Lines without
a marker are ignored. Gating a bare `tf-keras` line after the pinned one
rewrote `tf-keras==2.19.0`'s marker from `< "3.12"` to `< "3.14"`, which
would have applied that pin on 3.12/3.13. So those lines are split at
3.12.
- **Tests that can't run on 3.14:** with zarr, lerobot, datasketches,
raydp, tensorflow and the RL env packages dropped, the tests that use
them need 3.14 skips once 3.14 test jobs exist.

## User-visible change (py3.14 images)

- **ray-torch py3.14:** transformers 4.57.6 → **5.19.0** (tokenizers
0.23.2, huggingface-hub 1.33.0).
- **All py3.14 image locks** now install from wheels only, apart from
packages that have never shipped a wheel.

<details><summary>Full diff of requirements_compiled_py3.14.txt pins vs
master (108 packages)</summary>

**Changed (35):** accelerate 0.28.0→1.15.0, ale-py 0.10.1→0.12.1,
array-record 0.5.1→0.8.3, click 8.3.2→8.5.0, crc32c 2.3→2.9.post0,
cryptography 44.0.3→47.0.0, datasets 3.6.0→4.8.5, etils 1.5.2→1.14.0,
evaluate 0.4.3→0.4.6, h5py 3.12.1→3.16.0, hf-xet 1.4.3→1.7.0,
huggingface-hub 0.36.2→1.33.0, jax 0.4.33→0.11.2, jaxlib 0.4.33→0.11.2,
mlflow / mlflow-skinny / mlflow-tracing 3.11.1→3.16.1, mujoco
3.2.4→3.15.0, onnx 1.16.0→1.23.2, open-spiel 1.4→2.0.2, py-spy
0.4.1→0.4.2, pyiceberg 0.11.0→0.12.0, pymongo 4.3.2→4.18.2, pymunk
6.2.1→7.3.0, pyopenssl 25.1.0→26.2.0, s3torchconnector 1.4.3→1.5.0,
s3torchconnectorclient 1.4.3→1.5.0, safetensors 0.7.0→0.8.0,
sentencepiece 0.1.96→0.2.1, snowflake-connector-python 4.3.0→4.8.0,
tensordict 0.8.3→0.14.2, tokenizers 0.15.2→0.23.2, transformers
4.36.2→5.19.0, urllib3 2.0.7→1.26.20 (+ deepspeed marker only)

**Added (13), all already in the shared sources:** audioop-lts, av,
cuda-pathfinder, hf-gradio, mcap, obstore, onnx-ir, onnxscript, pymysql,
pyvers, ray-haproxy, taskiq-redis, torchcodec

**Removed (60):** the gated packages above and what only they pull in
(tensorflow stack, RL envs, aim/mosaicml/hpbandster/uvloop which the
sources already gate to <3.12), plus stale entries no current source
requires (sphinx/myst/ruff family).
</details>

## Testing

Run on x86_64 Linux in a Python 3.11 venv:

- `ci/ci.sh compile_pip_dependencies`, then `ci/ci.sh
compile_pip_dependencies_py314`, then `bazelisk run
//ci/raydepsets:raydepsets -- build --all-configs`. All succeed.
- Running `compile_pip_dependencies_py314` a second time reproduces the
committed file byte for byte, so the new CI check passes. This was also
checked with `UV_NO_CACHE=1`, which is how CI runs it: a warm local uv
cache had hidden the hyperopt failure below.
- **Wheels-only install check:** each regenerated py3.14 lock passes `uv
pip compile --no-deps --python-version 3.14 --python-platform
x86_64-manylinux_2_35 --only-binary :all:` (minus the sdist-only list).
That covers base_deps, base_extra, base_extra_testdeps, base_slim,
ray_img, ray_img_cu130 and ray-torch.
- **No version changes on other Pythons:** the pin sets of all 38
changed non-3.14 locks are identical to master, ignoring markers.
- pytest 7.4.4 and urllib3 1.26.20 were checked on CPython 3.14.3.

## Not changed here

- **datasketches in base-extra:** `docker/base-extra/requirements.in`
lists it directly, so the base-extra py3.14 image still builds it from
source, same as master.
- **TPU py3.14 lock:** it doesn't use this constraints file, and
`tensorboard-plugin-profile` there has no cp314 wheel.

AI assistance (Claude Code) was used to investigate and write this
change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core devprod go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant