Skip to content

[ci][deps] Bump torch to 2.10.0 fleet-wide and retire the Windows torch 2.7 special case - #65909

Merged
elliot-barn merged 4 commits into
masterfrom
elliot-barn/torch-2.10
Oct 1, 2026
Merged

elliot-barn merged 4 commits into
masterfrom
elliot-barn/torch-2.10

Conversation

@elliot-barn

@elliot-barn elliot-barn commented Sep 4, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Bumps the repo-wide torch pin from 2.9.0 to 2.10.0 (torchvision 0.24.0 → 0.25.0) across CI, the release BYOD images and the compiled constraints, and retires the Windows-only torch 2.7 special case that the 2.9 pin forced.

Why now: torch 2.8/2.9 Windows wheels were built without libuv, so torch.distributed's gloo backend could not initialize on Windows (pytorch/pytorch#150381). The fix (pytorch/gloo#472) ships in torch 2.10, and windows-requirements.txt carried the instruction "Keep Windows CI on 2.7.0 until the repo-wide torch pin reaches >=2.10, then delete this file and the windows torch2.7 depsets." This PR does exactly that.

Pins moved

  • python/requirements/ml/dl-cpu-requirements.txt: torch==2.10.0, torchvision==0.25.0, torch-scatter==2.1.2+cpu.torch.2.10 (Astral), torch-sparse==0.6.18+pt210cpu (PyG torch-2.10.0+cpu page). nvidia-nccl-cu12==2.27.5 is unchanged — torch 2.10.0+cu128 still requires exactly that.
  • dl-gpu-requirements.txt: torch==2.10.0+cu128, torchvision==0.25.0+cu128, torch-scatter==2.1.2+cu.12.8.torch.2.10, torch-sparse==0.6.18+pt210cu128.
  • data-test-requirements.txt: torchvision==0.25.0; torchcodec cap flipped from <0.10 to >=0.10,<0.11 — its libtorchcodec is ABI-bound to a torch minor and declares no torch requirement, so the line has to be pinned by hand: 0.9.x was built for torch 2.9 and would fail to load, 0.10.x is the torch 2.10 line (lerobot 0.5.1 allows <0.11).
  • Release BYOD: requirements_ml_byod_3.10.in (torch==2.10.0, triton==3.6.0 — torch 2.10 requires triton 3.6), requirements_ml_byod_3.13.in (torch==2.10.0), requirements_gpu_cu130.in (2.9.1 → 2.10.0).
  • requirements_compiled_py3.14.txt: torch==2.10.0, torchvision==0.25.0, PyG find-links → torch-2.10.0+cpu — mirrored by hand as always for this file. Note torch 2.10 is the first line with cp314 wheels, so this snapshot's torch pin is now actually satisfiable on py3.14 (it pinned 2.7.0, which has none); unifying docker/ray-torch/torch-constraints-py3.14.txt onto it is a possible follow-up, not done here.

ray-torch image: py3.14 now shares the compiled constraints (closes the TODO in ray_torch.depsets.yaml)

ray_torch.depsets.yaml carried two copies of the same depset because requirements_compiled_py3.14.txt pinned torch 2.7.0 (no cp314 wheels), so the py3.14 image had to pin torch itself in docker/ray-torch/torch-constraints-py3.14.txt. With the snapshot on 2.10.0 every pin in that side file (torch, torchvision, cupy-cuda12x, llvmlite, numba, dm-tree) is supplied identically by the snapshot, so the two entries collapse into one constrained by /tmp/ray-deps/requirements_compiled_py${PYTHON_VERSION}.txt and the side file is deleted. Two things had to move for that to resolve:

  • nvidia-nccl-cu12 in the py3.14 snapshot: 2.26.2 → 2.27.5 — the torch-2.7-era value was never mirrored; torch 2.10.0 requires 2.27.5 exactly (same as requirements_compiled.txt / dl-cpu-requirements.txt).
  • Effect on the py3.14 ray-torch lock: it was previously unconstrained apart from the six side-file pins, so ~100 of its packages floated to whatever was newest at compile time; they are now held to the py3.14 compiled snapshot the same way the py3.11 image is held to requirements_compiled.txt. Most of the ~109 moved lines are exactly that (e.g. pytest 9.0.3 → 8.3.3, numpy 2.4.6 → 2.3.3, sentence-transformers 5.5.1 → 3.0.1). Caveat worth knowing: requirements_compiled_py3.14.txt is a hand-maintained snapshot and differs from requirements_compiled.txt in 28 of 607 shared pins (mixed direction — transformers 4.36.2 vs 5.11.0 and datasets 3.6.0 vs 4.8.5 older, numpy/pytest/urllib3/grpcio/pydantic newer) plus 15 py3.14-only pins, so the two ray-torch images are aligned in policy but not yet byte-for-byte in versions. Refreshing that snapshot toward requirements_compiled.txt (now that torch 2.10 makes it possible) is the natural follow-up. The py3.11 lock only gains langchain-text-splitters and its closure plus the jsonpatch bump.
  • jsonpatch==1.32 → 1.33 in test-requirements.txt. langchain-text-splitters (in the ray-torch image since [release] Add ray-torch release test image (py3.14, cu12.8) #65114) needs a langchain-core requiring jsonpatch>=1.33; 1.32 was a 2023 tier-split snapshot pin ([requirements] Split requirements into different tiers [build_base] #36808), 1.33 is the last release, and the only other consumer (cfn-lint) takes any version. This also removes the reason langchain-text-splitters was excluded from the py3.11 ray-torch image, so that python_version >= "3.12" marker is dropped and both images match.

Windows special case removed

  • python/requirements/windows-requirements.txt deleted.
  • ci_windows.depsets.yaml: relaxed_windows_tests_ci_depset and windows_tests_torch27_ci_depset removed; their two locks deleted.
  • ci/docker/windows.build.wanda.yaml and ci/ray_ci/windows/build_base.sh now consume windows-tests-ci_depset_py3.10.lock directly (the lock the torch27 one was derived from).

Not moved (deliberately)

  • LLM stack (python/requirements/llm, python/deplocks/llm/*): pinned by vllm==0.27.0 to torch 2.13; independent of this pin.
  • doc/source/templates/** (torch 2.0.1): legacy template examples, out of scope.
  • docker/ray-torch/torch-constraints-py3.14.txt already pins torch 2.10.0 / torchvision 0.25.0.

What moved in the locks

Aggregated across the 38 changed locks — nothing outside torch's own closure: torch 2.9.0→2.10.0 (+cpu/+cu128), torchvision 0.24.0→0.25.0, torch-scatter/torch-sparse to the torch-2.10 builds, triton 3.5.0→3.6.0 (13 GPU locks), torchcodec 0.9.1→0.10.0 (3 data locks), nvidia-nvshmem-cu12 3.3.20→3.4.5 (13 GPU locks), and the cuda-bindings/cuda-python/cuda-pathfinder set that torch 2.10's cu128 wheel pulls in (torch 2.10.0+cu128 declares cuda-bindings==12.9.4 exactly, which brings cuda-pathfinder and moves the five py3.12 GPU locks that previously resolved cuda-bindings/cuda-python 12.9.6 down to 12.9.4). deepspeed stays 0.18.9.

Verified locally

  • torch 2.10.0 has cp310/cp312/cp314 wheels on download.pytorch.org/whl/{cpu,cu128,cu130} and win_amd64 on PyPI; torchvision 0.25.0 likewise (and the repo's ray-torch py3.14 constraints already pair 2.10.0 with 0.25.0).
  • PyG publishes torch_sparse 0.6.18+pt210{cpu,cu128} for cp310/cp312 (linux + win); Astral publishes torch-scatter 2.1.2+cpu.torch.2.10 / +cu.12.8.torch.2.10.
  • No caps in the way: torchtext 0.18.0 requires torch>=2.3.0; pytorch-lightning 1.8.6 requires torch>=1.9.0; torchft-nightly requires torch>=2.7.
  • ./ci/ci.sh compile_pip_dependencies → exit 0; diff vs base is exactly the find-links URL, torch==2.10.0, torchvision==0.25.0
  • bazel run //ci/raydepsets:raydepsets -- build --all-configs → exit 0, 105 depsets; 38 locks modified, 2 deleted (the Windows torch27 pair); every non-LLM lock now pins torch==2.10.0
  • bazel run //ci/raydepsets:raydepsets -- build --all-configs --check → exit 0, all 105 depsets regenerate byte-identically

Follows #65899 (Astral index / PyG cleanup), which has merged; this PR is rebased on top of it.

Related issues

pytorch/pytorch#150381, pytorch/gloo#472. Follows #65899.

Additional information

Not a duplicate: open dependabot PRs (#64868, #64860, #64005) bump torch in single requirement files without the Windows/PyG/torchcodec/lock changes, and each carries a failing check; no open PR bumps the fleet pin coherently.

AI assistance (Claude Code) was used for this change; every changed line was reviewed by the submitter.

🤖 Generated with Claude Code

@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.

…ch 2.7 special case

torch 2.9.0 -> 2.10.0 and torchvision 0.24.0 -> 0.25.0 in dl-cpu/dl-gpu
requirements, data-test-requirements, the release BYOD .in files, the
compiled constraints and every non-LLM lock (38 modified). The PyG
extensions move to their torch-2.10 builds (Astral torch-scatter
+cpu.torch.2.10 / +cu.12.8.torch.2.10, PyG torch-sparse +pt210cpu /
+pt210cu128). torchcodec's cap flips from <0.10 to >=0.10,<0.11: its
libtorchcodec is ABI-bound to the torch minor and 0.10.x is the torch 2.10
line. triton follows torch to 3.6.0 (3.6 in the ml_byod_3.10 .in as well).

torch 2.8/2.9 Windows wheels lacked libuv and could not initialize the gloo
backend (pytorch/pytorch#150381); the fix (pytorch/gloo#472) ships in 2.10,
so the Windows-only torch 2.7 pin, its relaxed/torch27 depsets and locks are
deleted and the windowsbuild image consumes windows-tests-ci_depset directly.

The LLM stack (vllm-pinned to torch 2.13) and the legacy doc templates are
untouched.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn force-pushed the elliot-barn/torch-2.10 branch from 78d286b to 6701ab0 Compare September 4, 2026 01:19
@elliot-barn elliot-barn added the go add ONLY when ready to merge, run all tests label Sep 4, 2026
…(closes the py3.14 TODO)

ray_torch.depsets.yaml carried two copies of the same depset because
requirements_compiled_py3.14.txt pinned torch 2.7.0 (no cp314 wheels), so the
py3.14 image pinned torch itself in docker/ray-torch/torch-constraints-py3.14.txt.
With the snapshot on torch 2.10.0 every pin in that side file is supplied by the
snapshot, so the two entries collapse into one constrained by
requirements_compiled_py${PYTHON_VERSION}.txt and the side file is deleted.

Two changes were needed for the unified py3.14 depset to resolve:
- nvidia-nccl-cu12 in the py3.14 snapshot: 2.26.2 -> 2.27.5 (torch 2.10.0
  requires 2.27.5 exactly; matches requirements_compiled.txt / dl-cpu).
- jsonpatch==1.32 -> 1.33 in test-requirements.txt: langchain-text-splitters
  (in the ray-torch image since #65114) needs a langchain-core requiring
  jsonpatch>=1.33. 1.32 was a 2023 tier-split snapshot pin, 1.33 is the last
  release, and the only other consumer (cfn-lint) takes any version. This also
  removes the reason langchain-text-splitters was excluded from the py3.11
  ray-torch image, so that marker is dropped and both images match.

The py3.14 ray-torch lock, previously unconstrained apart from the side-file
pins, is now held to the py3.14 compiled snapshot like the py3.11 image is held
to requirements_compiled.txt (~109 lines move, mostly packages that used to
float). jsonpatch 1.33 flows into 37 locks.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Sep 23, 2026
@dstrodtman

Copy link
Copy Markdown
Contributor

Docs-side follow-up for the torch pin: doc/source/conf.py pins the torch intersphinx inventory to the torch version in dl-*-requirements.txt, and its comment says to bump it together with that pin:

"torch": (
    "https://docs.pytorch.org/docs/stable/",
    # Pinned to the torch version in python/requirements/ml/dl-*-requirements.txt
    # ...Bump this with that pin, then re-run _intersphinx/refresh.py torch.
    "https://docs.pytorch.org/docs/2.9/objects.inv",
),

Could you move it to https://docs.pytorch.org/docs/2.10/objects.inv (live, returns 200), run python doc/source/_intersphinx/refresh.py torch to regenerate doc/source/_intersphinx/torch.inv, and update the docs/2.9/ mention in doc/source/_intersphinx/README.md? Nothing breaks if it stays at 2.9. Cross-references just keep resolving against 2.9 symbols. Happy for it to be a follow-up if you'd rather keep this PR to deps only.

@dstrodtman dstrodtman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good from docs.

I've removed torch from the docs image (doc-test image is updated here).

@github-actions github-actions Bot added unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it. and removed stale The issue is stale. It will be closed within 7 days unless there are further conversation labels Sep 25, 2026
Regenerated requirements_compiled.txt (compile_pip_dependencies, py3.11)
and all deplocks (raydepsets build --all-configs) from master's locks.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: elliot-barn <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5d9dd8f. Configure here.

json5==0.14.0
# via jupyterlab-server
jsonpatch==1.32
jsonpatch==1.33

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale PyG find-links URL

Medium Severity

requirements_compiled_py3.14.txt now pins torch==2.10.0 but still uses the PyG find-links page for torch 2.7.0. That page does not host the 2.10 torch-sparse / torch-scatter wheels, so any resolve that honors this header cannot fetch the builds that match the new pin.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5d9dd8f. Configure here.

Resolve deplock conflicts from #66446 (uvicorn 0.53.0 / watchfiles 1.3.0): keep the retired Windows torch27 locks deleted and regenerate all locks with raydepsets.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@elliot-barn
elliot-barn merged commit 7219dac into master Oct 1, 2026
5 of 6 checks passed
@elliot-barn
elliot-barn deleted the elliot-barn/torch-2.10 branch October 1, 2026 20:10
elliot-barn pushed a commit that referenced this pull request Oct 2, 2026
## What

Docs-side follow-up to #65909, which bumps torch to 2.10.0. Stacked on
that PR's branch (`elliot-barn/torch-2.10`), so the diff here is only
the three docs files.

`doc/source/conf.py` pins the torch intersphinx inventory to the torch
version in `python/requirements/ml/dl-*-requirements.txt`, and its
comment says to bump the two together and re-run the refresh script.
This PR does that:

1. Moves the torch inventory URL in `conf.py` from
`https://docs.pytorch.org/docs/2.9/objects.inv` to
`https://docs.pytorch.org/docs/2.10/objects.inv`.
1. Regenerates the committed snapshot with `python
doc/source/_intersphinx/refresh.py torch`, so
`doc/source/_intersphinx/torch.inv` now holds the 2.10 inventory.
1. Updates the `docs/2.9/` mention in
`doc/source/_intersphinx/README.md`.
1. Pins the torch `base_url` to `https://docs.pytorch.org/docs/2.10/`
instead of `docs/stable/`, and derives the inventory from it (`None`,
which is `<base_url>objects.inv`, the same URL as before). The inventory
was pinned, but links were still built on `stable`, which serves the
newest release (2.14 today). PyTorch renames pages between releases, so
that pairing can emit 404s, and it did: the 2.9 inventory's
`generated/torch.cuda.Stream.html` doesn't exist on `stable`, and the
nightly `doc: linkcheck` step reports it broken. With both on 2.10, a
cross-reference resolves only to symbols that version ships and links to
that version's page. There's also one value to bump with the
requirements pin instead of two.

Cross-references to torch symbols now resolve against the version Ray
actually ships, rather than 2.9 symbols.

### Related PyTorch link fixes

Bundled here because they're the same surface. Each is too small for its
own PR.

- `doc/source/ray-more-libs/ray-collective.rst` linked
`distributed.html#gloo`. That anchor doesn't exist in PyTorch 2.10 or
2.14, so the link landed at the top of a very long page, and linkcheck
never flagged it because `linkcheck_anchors = False`. It now points at
`#backends-that-come-with-pytorch`, the table of Gloo's supported
collectives.
- 33 hand-written `https://pytorch.org/docs/stable/` links in `doc/`,
RLlib, and Train now use `https://docs.pytorch.org/docs/stable/`, which
the old host 301-redirects to. They stay on `stable/` on purpose. Prose
links describe general concepts and don't depend on the intersphinx
inventory, so they can't drift the way the `Stream` link did. The two
links in Ray Data (`read_api.py`, `torch_datasource.py`) are left for
that team.

Every updated URL returns HTTP 200 through PyTorch's `stable/` redirect,
and every `#anchor` exists on the 2.14 page it reaches. The same pages
and anchors also exist under `docs/2.10/`.

## Merge order

Merge this after #65909. Once #65909 squash-merges and its branch is
deleted, GitHub retargets this PR to `master`. I'll then rebase onto
`master` so the diff drops back to these three files.

## Why this isn't a duplicate

No other open PR touches the torch intersphinx pin. I searched open PRs
for `torch intersphinx`, `torch.inv`, `pytorch objects.inv`, and
`docs/2.10`, and the only hits were #65909 itself, which leaves the pin
at 2.9, and #65931, which is unrelated. The follow-up was proposed on
#65909 in
#65909 (comment)
and agreed with that PR's author as a separate change.

## Tests

- `refresh.py torch` fetched the 2.10 inventory (180,024 bytes, HTTP
200) and wrote the snapshot.
- Faithful local RtD build of this branch (Python 3.11,
`doc/requirements-doc.lock.txt`) with `make -C doc rtd-build`, which
runs `sphinx-build -a -E -W --keep-going`: `build succeeded.`, exit 0,
so zero Sphinx warnings under `-W`. The log confirms the `torch`
inventory loaded from the regenerated `_intersphinx/torch.inv`.

- After the `base_url` change, `refresh.py torch` derives
`https://docs.pytorch.org/docs/2.10/objects.inv` and leaves `torch.inv`
byte-identical, and a second faithful `make -C doc rtd-build` again
ended `build succeeded.` with exit 0. The build emits 10 distinct
intersphinx torch URLs, all now under `docs/2.10/`. Each one returns
HTTP 200 as a real page, not a redirect stub, and each `#anchor` exists
on its page, including
`generated/torch.cuda.Stream_class.html#torch.cuda.Stream`. Hand-written
`docs/stable/` links in prose are untouched.

The Read the Docs PR-preview build is the authoritative gate and runs on
this PR.

## AI assistance

This change was prepared with AI assistance (Claude Code). The submitter
reviewed the edits and the local build result.

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

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
elliot-barn added a commit that referenced this pull request Oct 5, 2026
… torch 2.10 wheels (#66713)

## Why

Premerge and postmerge wanda image builds are failing on master (for
example `corebuild`, `docgpubuild`, `datalbuild`, `data17build`,
`datamongobuild`, `mlgpubuild`; premerge #74324, postmerge #20108):

```
× Failed to download `torch-scatter==2.1.2+cpu.torch.2.10`
╰─▶ Hash mismatch for `torch-scatter==2.1.2+cpu.torch.2.10`
```

The same happens for `2.1.2+cu.12.8.torch.2.10`. Astral's index
(`wheels.astral.sh/simple/{cpu,cu128}/torch-scatter/`) re-published the
torch 2.10 wheels in place on **2026-10-03 at about 18:35 UTC**: same
filenames and versions, new contents. None of the hashes locked in
#65909 match what the index serves now.

## What

Regenerated hashes only, for the 29 locks that pin `torch-scatter`. **No
version changes.** All 290 added and 290 removed lines are `--hash`
lines under `torch-scatter`: the 20 previous hashes are gone from
Astral, and the 20 new ones are exactly what Astral serves now.

How it was generated: uv reuses hashes from an existing `-o` output
file, so a plain `raydepsets build --all-configs` reproduces the stale
hashes. I compiled once with `--upgrade-package torch-scatter`
temporarily appended to every non-`relax` depset's `append_flags`, then
reverted that config change. Nothing was hand-edited, and no config
change is included. Both the source requirements and the constraints pin
`torch-scatter` exactly, so `--upgrade-package` can only move hashes.

## Testing

- `bazel run //ci/raydepsets:raydepsets -- build --all-configs --check`:
`Lock files are up to date.` (exit 0)
- `uv pip install --no-deps --require-hashes` of the `torch-scatter`
block from `core-build-ci_depset_py3.10.lock` (cpu) and
`core-gpubuild-ci_depset_py3.10.lock` (cu128): both install.
- Checked the added and removed hashes against the live Astral JSON
index (20/20 present and 20/20 absent, respectively).

## Not a duplicate

The only open PR touching `torch-scatter` is #65931, which removes it
entirely (SAGE example → `NeighborLoader` + `pyg-lib`). That's the
long-term fix. This PR is the minimal unblock until it lands. Note that
`pyg-lib` also comes from Astral, so the same in-place re-publish can
hit it: Astral's index doesn't keep artifacts immutable the way PyPI
does.

AI assistance (Claude Code) was used to diagnose this and regenerate the
locks.

🤖 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]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…ch 2.7 special case (ray-project#65909)

## Description

Bumps the repo-wide torch pin from **2.9.0 to 2.10.0** (torchvision
0.24.0 → 0.25.0) across CI, the release BYOD images and the compiled
constraints, and retires the Windows-only torch 2.7 special case that
the 2.9 pin forced.

Why now: torch 2.8/2.9 Windows wheels were built without libuv, so
`torch.distributed`'s gloo backend could not initialize on Windows
(pytorch/pytorch#150381). The fix (pytorch/gloo#472) ships in torch
2.10, and `windows-requirements.txt` carried the instruction *"Keep
Windows CI on 2.7.0 until the repo-wide torch pin reaches >=2.10, then
delete this file and the windows torch2.7 depsets."* This PR does
exactly that.

### Pins moved
- `python/requirements/ml/dl-cpu-requirements.txt`: `torch==2.10.0`,
`torchvision==0.25.0`, `torch-scatter==2.1.2+cpu.torch.2.10` (Astral),
`torch-sparse==0.6.18+pt210cpu` (PyG `torch-2.10.0+cpu` page).
`nvidia-nccl-cu12==2.27.5` is unchanged — torch 2.10.0+cu128 still
requires exactly that.
- `dl-gpu-requirements.txt`: `torch==2.10.0+cu128`,
`torchvision==0.25.0+cu128`, `torch-scatter==2.1.2+cu.12.8.torch.2.10`,
`torch-sparse==0.6.18+pt210cu128`.
- `data-test-requirements.txt`: `torchvision==0.25.0`; **`torchcodec`
cap flipped from `<0.10` to `>=0.10,<0.11`** — its `libtorchcodec` is
ABI-bound to a torch minor and declares no torch requirement, so the
line has to be pinned by hand: 0.9.x was built for torch 2.9 and would
fail to load, 0.10.x is the torch 2.10 line (lerobot 0.5.1 allows
`<0.11`).
- Release BYOD: `requirements_ml_byod_3.10.in` (`torch==2.10.0`,
`triton==3.6.0` — torch 2.10 requires triton 3.6),
`requirements_ml_byod_3.13.in` (`torch==2.10.0`),
`requirements_gpu_cu130.in` (`2.9.1` → `2.10.0`).
- `requirements_compiled_py3.14.txt`: `torch==2.10.0`,
`torchvision==0.25.0`, PyG find-links → `torch-2.10.0+cpu` — mirrored by
hand as always for this file. Note torch 2.10 is the first line with
cp314 wheels, so this snapshot's torch pin is now actually satisfiable
on py3.14 (it pinned 2.7.0, which has none); unifying
`docker/ray-torch/torch-constraints-py3.14.txt` onto it is a possible
follow-up, not done here.

### ray-torch image: py3.14 now shares the compiled constraints (closes
the TODO in `ray_torch.depsets.yaml`)
`ray_torch.depsets.yaml` carried two copies of the same depset because
`requirements_compiled_py3.14.txt` pinned torch 2.7.0 (no cp314 wheels),
so the py3.14 image had to pin torch itself in
`docker/ray-torch/torch-constraints-py3.14.txt`. With the snapshot on
2.10.0 every pin in that side file (`torch`, `torchvision`,
`cupy-cuda12x`, `llvmlite`, `numba`, `dm-tree`) is supplied identically
by the snapshot, so the two entries collapse into one constrained by
`/tmp/ray-deps/requirements_compiled_py${PYTHON_VERSION}.txt` and the
side file is deleted. Two things had to move for that to resolve:
- `nvidia-nccl-cu12` in the py3.14 snapshot: `2.26.2` → `2.27.5` — the
torch-2.7-era value was never mirrored; torch 2.10.0 requires 2.27.5
exactly (same as `requirements_compiled.txt` /
`dl-cpu-requirements.txt`).
- **Effect on the py3.14 ray-torch lock:** it was previously
unconstrained apart from the six side-file pins, so ~100 of its packages
floated to whatever was newest at compile time; they are now held to the
py3.14 compiled snapshot the same way the py3.11 image is held to
`requirements_compiled.txt`. Most of the ~109 moved lines are exactly
that (e.g. `pytest` 9.0.3 → 8.3.3, `numpy` 2.4.6 → 2.3.3,
`sentence-transformers` 5.5.1 → 3.0.1). Caveat worth knowing:
`requirements_compiled_py3.14.txt` is a hand-maintained snapshot and
differs from `requirements_compiled.txt` in 28 of 607 shared pins (mixed
direction — `transformers` 4.36.2 vs 5.11.0 and `datasets` 3.6.0 vs
4.8.5 older, `numpy`/`pytest`/`urllib3`/`grpcio`/`pydantic` newer) plus
15 py3.14-only pins, so the two ray-torch images are aligned in *policy*
but not yet byte-for-byte in versions. Refreshing that snapshot toward
`requirements_compiled.txt` (now that torch 2.10 makes it possible) is
the natural follow-up. The py3.11 lock only gains
`langchain-text-splitters` and its closure plus the jsonpatch bump.
- **`jsonpatch==1.32` → `1.33`** in `test-requirements.txt`.
`langchain-text-splitters` (in the ray-torch image since ray-project#65114) needs a
`langchain-core` requiring `jsonpatch>=1.33`; 1.32 was a 2023 tier-split
snapshot pin (ray-project#36808), 1.33 is the last release, and the only other
consumer (`cfn-lint`) takes any version. This also removes the reason
`langchain-text-splitters` was excluded from the py3.11 ray-torch image,
so that `python_version >= "3.12"` marker is dropped and both images
match.

### Windows special case removed
- `python/requirements/windows-requirements.txt` deleted.
- `ci_windows.depsets.yaml`: `relaxed_windows_tests_ci_depset` and
`windows_tests_torch27_ci_depset` removed; their two locks deleted.
- `ci/docker/windows.build.wanda.yaml` and
`ci/ray_ci/windows/build_base.sh` now consume
`windows-tests-ci_depset_py3.10.lock` directly (the lock the torch27 one
was derived from).

### Not moved (deliberately)
- LLM stack (`python/requirements/llm`, `python/deplocks/llm/*`): pinned
by `vllm==0.27.0` to torch 2.13; independent of this pin.
- `doc/source/templates/**` (torch 2.0.1): legacy template examples, out
of scope.
- `docker/ray-torch/torch-constraints-py3.14.txt` already pins torch
2.10.0 / torchvision 0.25.0.

### What moved in the locks
Aggregated across the 38 changed locks — nothing outside torch's own
closure: `torch` 2.9.0→2.10.0 (+cpu/+cu128), `torchvision`
0.24.0→0.25.0, `torch-scatter`/`torch-sparse` to the torch-2.10 builds,
`triton` 3.5.0→3.6.0 (13 GPU locks), `torchcodec` 0.9.1→0.10.0 (3 data
locks), `nvidia-nvshmem-cu12` 3.3.20→3.4.5 (13 GPU locks), and the
`cuda-bindings`/`cuda-python`/`cuda-pathfinder` set that torch 2.10's
cu128 wheel pulls in (torch 2.10.0+cu128 declares
`cuda-bindings==12.9.4` exactly, which brings `cuda-pathfinder` and
moves the five py3.12 GPU locks that previously resolved
`cuda-bindings`/`cuda-python` 12.9.6 down to 12.9.4). `deepspeed` stays
`0.18.9`.

### Verified locally
- torch 2.10.0 has cp310/cp312/cp314 wheels on
`download.pytorch.org/whl/{cpu,cu128,cu130}` and win_amd64 on PyPI;
torchvision 0.25.0 likewise (and the repo's ray-torch py3.14 constraints
already pair 2.10.0 with 0.25.0).
- PyG publishes `torch_sparse 0.6.18+pt210{cpu,cu128}` for cp310/cp312
(linux + win); Astral publishes `torch-scatter 2.1.2+cpu.torch.2.10` /
`+cu.12.8.torch.2.10`.
- No caps in the way: `torchtext 0.18.0` requires `torch>=2.3.0`;
`pytorch-lightning 1.8.6` requires `torch>=1.9.0`; `torchft-nightly`
requires `torch>=2.7`.
- `./ci/ci.sh compile_pip_dependencies` → exit 0; diff vs base is
exactly the find-links URL, `torch==2.10.0`, `torchvision==0.25.0`
- `bazel run //ci/raydepsets:raydepsets -- build --all-configs` → exit
0, 105 depsets; 38 locks modified, 2 deleted (the Windows torch27 pair);
every non-LLM lock now pins `torch==2.10.0`
- `bazel run //ci/raydepsets:raydepsets -- build --all-configs --check`
→ exit 0, all 105 depsets regenerate byte-identically

Follows ray-project#65899 (Astral index / PyG cleanup), which has merged; this PR
is rebased on top of it.

## Related issues

pytorch/pytorch#150381, pytorch/gloo#472. Follows ray-project#65899.

## Additional information

Not a duplicate: open dependabot PRs (ray-project#64868, ray-project#64860, ray-project#64005) bump torch
in single requirement files without the Windows/PyG/torchcodec/lock
changes, and each carries a failing check; no open PR bumps the fleet
pin coherently.

AI assistance (Claude Code) was used for this change; every changed line
was reviewed by the submitter.

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

---------

Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…oject#66533)

## What

Docs-side follow-up to ray-project#65909, which bumps torch to 2.10.0. Stacked on
that PR's branch (`elliot-barn/torch-2.10`), so the diff here is only
the three docs files.

`doc/source/conf.py` pins the torch intersphinx inventory to the torch
version in `python/requirements/ml/dl-*-requirements.txt`, and its
comment says to bump the two together and re-run the refresh script.
This PR does that:

1. Moves the torch inventory URL in `conf.py` from
`https://docs.pytorch.org/docs/2.9/objects.inv` to
`https://docs.pytorch.org/docs/2.10/objects.inv`.
1. Regenerates the committed snapshot with `python
doc/source/_intersphinx/refresh.py torch`, so
`doc/source/_intersphinx/torch.inv` now holds the 2.10 inventory.
1. Updates the `docs/2.9/` mention in
`doc/source/_intersphinx/README.md`.
1. Pins the torch `base_url` to `https://docs.pytorch.org/docs/2.10/`
instead of `docs/stable/`, and derives the inventory from it (`None`,
which is `<base_url>objects.inv`, the same URL as before). The inventory
was pinned, but links were still built on `stable`, which serves the
newest release (2.14 today). PyTorch renames pages between releases, so
that pairing can emit 404s, and it did: the 2.9 inventory's
`generated/torch.cuda.Stream.html` doesn't exist on `stable`, and the
nightly `doc: linkcheck` step reports it broken. With both on 2.10, a
cross-reference resolves only to symbols that version ships and links to
that version's page. There's also one value to bump with the
requirements pin instead of two.

Cross-references to torch symbols now resolve against the version Ray
actually ships, rather than 2.9 symbols.

### Related PyTorch link fixes

Bundled here because they're the same surface. Each is too small for its
own PR.

- `doc/source/ray-more-libs/ray-collective.rst` linked
`distributed.html#gloo`. That anchor doesn't exist in PyTorch 2.10 or
2.14, so the link landed at the top of a very long page, and linkcheck
never flagged it because `linkcheck_anchors = False`. It now points at
`#backends-that-come-with-pytorch`, the table of Gloo's supported
collectives.
- 33 hand-written `https://pytorch.org/docs/stable/` links in `doc/`,
RLlib, and Train now use `https://docs.pytorch.org/docs/stable/`, which
the old host 301-redirects to. They stay on `stable/` on purpose. Prose
links describe general concepts and don't depend on the intersphinx
inventory, so they can't drift the way the `Stream` link did. The two
links in Ray Data (`read_api.py`, `torch_datasource.py`) are left for
that team.

Every updated URL returns HTTP 200 through PyTorch's `stable/` redirect,
and every `#anchor` exists on the 2.14 page it reaches. The same pages
and anchors also exist under `docs/2.10/`.

## Merge order

Merge this after ray-project#65909. Once ray-project#65909 squash-merges and its branch is
deleted, GitHub retargets this PR to `master`. I'll then rebase onto
`master` so the diff drops back to these three files.

## Why this isn't a duplicate

No other open PR touches the torch intersphinx pin. I searched open PRs
for `torch intersphinx`, `torch.inv`, `pytorch objects.inv`, and
`docs/2.10`, and the only hits were ray-project#65909 itself, which leaves the pin
at 2.9, and ray-project#65931, which is unrelated. The follow-up was proposed on
ray-project#65909 in
ray-project#65909 (comment)
and agreed with that PR's author as a separate change.

## Tests

- `refresh.py torch` fetched the 2.10 inventory (180,024 bytes, HTTP
200) and wrote the snapshot.
- Faithful local RtD build of this branch (Python 3.11,
`doc/requirements-doc.lock.txt`) with `make -C doc rtd-build`, which
runs `sphinx-build -a -E -W --keep-going`: `build succeeded.`, exit 0,
so zero Sphinx warnings under `-W`. The log confirms the `torch`
inventory loaded from the regenerated `_intersphinx/torch.inv`.

- After the `base_url` change, `refresh.py torch` derives
`https://docs.pytorch.org/docs/2.10/objects.inv` and leaves `torch.inv`
byte-identical, and a second faithful `make -C doc rtd-build` again
ended `build succeeded.` with exit 0. The build emits 10 distinct
intersphinx torch URLs, all now under `docs/2.10/`. Each one returns
HTTP 200 as a real page, not a redirect stub, and each `#anchor` exists
on its page, including
`generated/torch.cuda.Stream_class.html#torch.cuda.Stream`. Hand-written
`docs/stable/` links in prose are untouched.

The Read the Docs PR-preview build is the authoritative gate and runs on
this PR.

## AI assistance

This change was prepared with AI assistance (Claude Code). The submitter
reviewed the edits and the local build result.

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

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
… torch 2.10 wheels (ray-project#66713)

## Why

Premerge and postmerge wanda image builds are failing on master (for
example `corebuild`, `docgpubuild`, `datalbuild`, `data17build`,
`datamongobuild`, `mlgpubuild`; premerge #74324, postmerge ray-project#20108):

```
× Failed to download `torch-scatter==2.1.2+cpu.torch.2.10`
╰─▶ Hash mismatch for `torch-scatter==2.1.2+cpu.torch.2.10`
```

The same happens for `2.1.2+cu.12.8.torch.2.10`. Astral's index
(`wheels.astral.sh/simple/{cpu,cu128}/torch-scatter/`) re-published the
torch 2.10 wheels in place on **2026-10-03 at about 18:35 UTC**: same
filenames and versions, new contents. None of the hashes locked in
ray-project#65909 match what the index serves now.

## What

Regenerated hashes only, for the 29 locks that pin `torch-scatter`. **No
version changes.** All 290 added and 290 removed lines are `--hash`
lines under `torch-scatter`: the 20 previous hashes are gone from
Astral, and the 20 new ones are exactly what Astral serves now.

How it was generated: uv reuses hashes from an existing `-o` output
file, so a plain `raydepsets build --all-configs` reproduces the stale
hashes. I compiled once with `--upgrade-package torch-scatter`
temporarily appended to every non-`relax` depset's `append_flags`, then
reverted that config change. Nothing was hand-edited, and no config
change is included. Both the source requirements and the constraints pin
`torch-scatter` exactly, so `--upgrade-package` can only move hashes.

## Testing

- `bazel run //ci/raydepsets:raydepsets -- build --all-configs --check`:
`Lock files are up to date.` (exit 0)
- `uv pip install --no-deps --require-hashes` of the `torch-scatter`
block from `core-build-ci_depset_py3.10.lock` (cpu) and
`core-gpubuild-ci_depset_py3.10.lock` (cu128): both install.
- Checked the added and removed hashes against the live Astral JSON
index (20/20 present and 20/20 absent, respectively).

## Not a duplicate

The only open PR touching `torch-scatter` is ray-project#65931, which removes it
entirely (SAGE example → `NeighborLoader` + `pyg-lib`). That's the
long-term fix. This PR is the minimal unblock until it lands. Note that
`pyg-lib` also comes from Astral, so the same in-place re-publish can
hit it: Astral's index doesn't keep artifacts immutable the way PyPI
does.

AI assistance (Claude Code) was used to diagnose this and regenerate the
locks.

🤖 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]>
ArturNiederfahrenhorst added a commit that referenced this pull request Oct 6, 2026
## Description

The torch 2.10 bump (#65909) broke
`examples/inference/policy_inference_after_training_w_connector_w_onnx`:
onnxruntime rejects the exported LSTM RLModule with

```
Node (node_transpose_3) Op (Transpose) [TypeInferenceError] Invalid attribute perm {1, 0, 2, 3}, input shape = {1, 0, 256}
```

Before torch 2.13, `torch.export` records `nn.LSTM`'s state outputs with
a spurious extra dim (pytorch/pytorch#151200).
`TorchLSTMEncoder` transposes the states back to batch-first, so the
export carries a 4-D Transpose for a 3-D tensor. On torch 2.9 this only
hit exports from a batch of two or more, and the example exports from
its batch of one. Torch 2.10 breaks that case too.

#66697 worked around it in the example: the legacy TorchScript exporter
(`dynamo=False`) below torch 2.13, the dynamo exporter from 2.13 on.
That keeps the deprecated exporter on CI's torch. And from 2.13 on, the
export from the example's batch of one fixes the batch dim at one, so
the exported model rejects any other batch size.

This PR fixes the encoder instead. `TorchLSTMEncoder` reshapes the
states to their `(num_layers, B, hidden_dim)` shape before transposing
them. That is a no-op in eager mode and gives the export the right rank.
The example goes back to its single dynamo-based export, without the
version check.

## Testing

Locally with CI's versions (torch 2.10.0, onnx 1.22.0, onnxscript 0.7.1,
onnxruntime 1.24.4):

```
pytest python/ray/rllib/core/models/tests/test_recurrent_encoders.py   # 3 passed, also with onnxruntime 1.20.0 (py3.10 CI image)
python python/ray/rllib/examples/inference/policy_inference_after_training_w_connector.py \
    --stop-reward=150.0 --use-onnx-for-inference --num-gpus-per-learner=0   # exit 0, 10 episodes through onnxruntime
```

Without the encoder change, both fail with the error above.

Written with AI assistance (Claude Code).

---------

Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
elliot-barn added a commit that referenced this pull request Oct 8, 2026
…es (#66760)

## Description

`//python/ray/tests:test_experimental_collective` has failed on every
full Windows postmerge run (`:ray: core: :windows: python tests
[g19_s5]`) since #65909 bumped torch to 2.10.0 and retired the Windows
torch 2.7 special case. Postmerge build 20086 (`dbaa45f0ae`, the commit
just before #65909) passes. Build 20084 (`7219dacfb6`, #65909 itself)
and every full run after it (20071 … 20130) fail.

The first subtest's real error:

```
File "...\torch\distributed\distributed_c10d.py", line 2043, in _new_process_group_helper
    backend_class = ProcessGroupGloo(
RuntimeError: makeDeviceForHostname(): unsupported gloo device
```

After that, every later subtest fails with `TimeoutError: Timed out
waiting for GLOO rendezvous metadata`.

#65909 assumed pytorch/gloo#472 shipped in torch 2.10, but the 2.10.0
Windows wheel is still built without libuv. I checked
`torch/lib/torch_cpu.dll` in each cp310 `win_amd64` wheel from
download.pytorch.org/whl/cpu:

| torch | `transport@gloo` symbols | imports `uv.dll` |
|---|---|---|
| 2.7.0 | 95 | yes |
| 2.10.0 | 8 | no |
| 2.11.0 / 2.12.0 / 2.13.0 | 95 | yes |

torch 2.11 is the first release with the gloo libuv transport back, so
this restores the Windows-only relax/expand depset pair that #65909
removed, pinned to `torch==2.11.0` / `torchvision==0.26.0` instead of
2.7. The rest of the fleet stays on 2.10. Remove the Windows pin once
the repo-wide pin reaches 2.11.

- `python/requirements/windows-requirements.txt`: Windows-only torch
pin, restored.
- `ci_windows.depsets.yaml`: `relaxed_windows_tests_ci_depset` and
`windows_tests_torch_ci_depset` restored.
- `windows.build.wanda.yaml` and `build_base.sh` now consume
`windows-tests-torch-ci_depset_py3.10.lock`.

The new lock differs from `windows-tests-ci_depset_py3.10.lock` in
exactly two pins: `torch` 2.10.0+cpu → 2.11.0+cpu and `torchvision`
0.25.0+cpu → 0.26.0+cpu.

## Testing

- `bazel run //ci/raydepsets:raydepsets -- build
ci/raydepsets/configs/ci_windows.depsets.yaml` → exit 0
- the same command with `--check` → exit 0, "Lock files are up to date."
- `pre-commit run` on the changed files → passed
- Verified on Windows CI in premerge build
[74454](https://buildkite.com/ray-project/premerge/builds/74454), using
a temporary commit (since dropped) that let the `flaky :windows: core
tests` step run on premerge, because `test_experimental_collective` is
currently tagged flaky:
  - `windowsbuild` installed `torch==2.11.0+cpu`.
- `//python/ray/tests:test_experimental_collective` passed on the first
attempt (83.3s); no `makeDeviceForHostname` / gloo rendezvous errors.
- The other Windows jobs (smoke, wheels, cpp, core python, serve, train)
passed.

## Additional information

Not a duplicate: no open PR mentions `test_experimental_collective` or
Windows torch/gloo.

AI assistance (Claude Code) was used for 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]>
elliot-barn added a commit that referenced this pull request Oct 9, 2026
…loo backend initializes (#66760) (#66858)

Cherry-pick of #66760 onto releases/2.60.0.

Conflict resolution notes (the branch predates #65909, which is
deliberately NOT picked — no fleet-wide torch 2.10 bump here):
- Took the incoming side of the config/requirements conflicts: Windows
pin moves 2.7.0 → 2.11.0, `windows_tests_torch27_*` depset renamed to
`windows_tests_torch_*`, torch27 lock renamed to
`windows-tests-torch-ci_depset_py3.10.lock`.
- Did NOT take master's generated lock content: master's base Windows
lock has drifted from this branch (dl-cpu/test-requirements changes from
#65909). Instead regenerated the derived locks on this branch with
`bazelisk run //ci/raydepsets:raydepsets -- build
ci/raydepsets/configs/ci_windows.depsets.yaml` — base locks reproduced
byte-identically, relaxed lock unchanged, and the torch lock now pins
`torch==2.11.0+cpu` / `torchvision==0.26.0+cpu`. `--check` passes ("Lock
files are up to date").

🤖 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]>
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 train Ray Train Related Issue unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it. windows

Development

Successfully merging this pull request may close these issues.

4 participants