Repository navigation
[ci][deps] Source torch-scatter from Astral's GPU index and drop the dead data.pyg.org find-links - #65899
Conversation
…dead data.pyg.org find-links data.pyg.org, the only host that ever served prebuilt PyTorch Geometric extension wheels, has been a dangling CNAME since 2026-09-02 (pyg-team/pyg-lib#719). Every ML/data/rllib/doc/windows depset declared it as --find-links, uv fails eagerly on an unreadable find-links URL, and the same line sits at the top of each lock, so both the raydepsets compile job and any cache-miss rebuild of the ML/GPU CI images were broken. #65880 soft-failed the job as a stopgap. - torch-scatter now comes from https://wheels.astral.sh/simple/{cpu,cu128}/, a PEP 503/691 index, so the requirement files use --extra-index-url. Astral ships manylinux only; the CPU pin is gated on sys_platform == 'linux'. - torch-sparse, torch-cluster and torch-spline-conv are dropped: no wheel source remains (PyPI is sdist-only), nothing in Ray imports them, and torch-geometric 2.5.3 neither requires them nor imports them unguarded. - deepspeed is pinned with === (arbitrary equality): Astral's cu128 index also publishes deepspeed 0.18.9+cu.12.8.torch.2.9, a bare ==0.18.9 matches that local version, and unsafe-best-match would otherwise swap deepspeed's build in every GPU depset and pull in nvidia-ml-py. - ci.sh compile_pip_dependencies strips the whole cpu local tag so the compiled file stays a bare torch-scatter==2.1.2 constraint for GPU depsets. - Windows loses the +pt27cpu PyG pins and their relax-list entries. - The raydepsets compile job hard-fails again (soft_fail removed). requirements_compiled.txt and 32 locks regenerated; the package-level delta in every lock is the PyG lines only. Signed-off-by: Elliot Barnwell <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request updates PyTorch Geometric (PyG) binary dependencies across various configuration and lock files, migrating from the defunct data.pyg.org wheel host to Astral's PEP 503 indexes (wheels.astral.sh). It drops torch-sparse, torch-cluster, and torch-spline-conv due to a lack of wheel sources, keeping only torch-scatter on Linux. Additionally, deepspeed is pinned using arbitrary equality (===) to avoid matching local versions from Astral's index. Feedback on the changes suggests improving the regular expression in ci/ci.sh to robustly handle pre-release or post-release versions and to enhance portability across different sed implementations.
| # this file is also the constraint for the GPU depsets, and only a bare | ||
| # torch-scatter==2.1.2 lets their +cu.12.8.torch.2.9 pin satisfy it. The old | ||
| # pattern stopped at the first "cpu" and left 2.1.2.torch.2.9 behind. | ||
| sed -i -E 's/==([.0-9]+)\+[A-Za-z0-9.]*cpu[A-Za-z0-9.]*/==\1/g' "python/$TARGET" |
There was a problem hiding this comment.
The current regular expression ==([.0-9]+)\+ only matches digits and dots for the public version part. If a pre-release, post-release, or dev-release version (e.g., 2.10.0rc1+cpu or 2.10.0.post0+cpu) is used in the future, this pattern will fail to match the full public version correctly.
Additionally, using [+] instead of \+ is more portable across different sed implementations (such as BSD sed on macOS vs GNU sed on Linux) when running in Extended Regular Expression (-E) mode, as some engines can have quirks with escaped metacharacters.
Updating the pattern to ([A-Za-z0-9.]+) and [+] resolves both issues robustly.
| sed -i -E 's/==([.0-9]+)\+[A-Za-z0-9.]*cpu[A-Za-z0-9.]*/==\1/g' "python/$TARGET" | |
| sed -i -E 's/==([A-Za-z0-9.]+)[+][A-Za-z0-9.]*cpu[A-Za-z0-9.]*/==\1/g' "python/$TARGET" |
There was a problem hiding this comment.
Taken in 7bbfe65. Verified the widened class is identical on every current line shape and a no-op on the regenerated requirements_compiled.txt; it only changes behaviour for pre/post/dev public versions, which the old [.0-9]+ left unstripped.
Review suggestion: the first capture group only admitted digits and dots, so a future torch==2.10.0rc1+cpu or 2.10.0.post0+cpu pin would have escaped the strip and conflicted as a constraint. No-op on the current compiled file. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
| packages: | ||
| - torch | ||
| - torchvision | ||
| # ABI-coupled PyG binaries; re-pinned as +pt27cpu builds in |
There was a problem hiding this comment.
no longer windows requirements
|
Converting to draft: verified empirically (torch 2.9.0 + torch-geometric 2.5.3, none of the four extensions installed) that |
…es into the py3.14 snapshot torch_geometric.loader.NeighborSampler builds a SparseTensor in __init__ and raises "ImportError: 'SparseTensor' requires 'torch-sparse'" without it; python/ray/train/examples/pytorch_geometric/distributed_sage_example.py (CI test distributed_sage_example, train_v2_gpu) uses it, and torch_sparse imports torch_scatter. No wheel source for torch-sparse exists other than data.pyg.org (PyPI is sdist-only; not on Astral, download.pytorch.org or pypi.nvidia.com), and that host is a flat page, not a PEP 503 index, so it stays on --find-links. Pinned to the explicit local builds so a missing wheel fails loudly rather than falling back to the sdist; gated on Linux like torch-scatter since torch_sparse cannot import without it and nothing on Windows or macOS uses PyG. torch-cluster and torch-spline-conv stay dropped: the example's full path trains with scatter + sparse only. requirements_compiled_py3.14.txt has no generator and is maintained by mirroring the hunks applied to requirements_compiled.txt; the same header and pin deltas are applied to it here, keeping its own torch-2.7.0 find-links. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
|
Un-drafting. |
There was a problem hiding this comment.
Code Review
This pull request updates PyTorch Geometric (PyG) dependency management to resolve issues with PyG's dangled wheel host. It migrates torch-scatter to Astral's simple PEP 503 indexes, restricts torch-scatter and torch-sparse to Linux, and drops unused extensions (torch-cluster and torch-spline-conv). Additionally, deepspeed is pinned using arbitrary equality (===) to prevent matching local versions from Astral's index. Feedback on the changes suggests refining the regular expression in ci/ci.sh to fully support PEP 440 local version identifiers by matching hyphens and underscores.
| # pattern stopped at the first "cpu" and left 2.1.2.torch.2.9 behind. The | ||
| # public version may carry a pre/post/dev suffix (2.10.0rc1, 2.10.0.post0), | ||
| # hence letters in the first class. | ||
| sed -i -E 's/==([A-Za-z0-9.]+)[+][A-Za-z0-9.]*cpu[A-Za-z0-9.]*/==\1/g' "python/$TARGET" |
There was a problem hiding this comment.
PEP 440 local version identifiers can contain hyphens (-) and underscores (_) as separators between segments (e.g., +cpu-ubuntu or +cpu_custom). The current regular expression [A-Za-z0-9.]* only matches alphanumeric characters and dots, which would stop matching at a hyphen or underscore, leaving a trailing suffix (e.g., ==2.1.2-ubuntu or ==2.1.2_custom) and resulting in an invalid version specifier.
To make the regex fully robust and PEP 440 compliant, we should include hyphens and underscores in the character class for the local version part.
| sed -i -E 's/==([A-Za-z0-9.]+)[+][A-Za-z0-9.]*cpu[A-Za-z0-9.]*/==\1/g' "python/$TARGET" | |
| sed -i -E 's/==([A-Za-z0-9.]+)[+][A-Za-z0-9._-]*cpu[A-Za-z0-9._-]*/==\1/g' "python/$TARGET" |
There was a problem hiding this comment.
Taken in 0e44f9f. Note pip-compile normalizes local separators to dots (packaging's Version str), so -/_ can't actually appear in the compiled file; the wider class is harmless and verified a no-op on both compiled files.
Review nit: PEP 440 local versions may use -/_ as separators; pip-compile normalizes them to dots so this cannot occur in the compiled file today, but the wider class costs nothing. Verified a no-op on both compiled files. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
|
Two follow-ups from review:
|
…65936) ## Description #65899 added astral's cu128 index for torch-scatter support, however, at the same time, started pulling in a DeepSpeed wheel that was compiled with torch 2.11 This wheel is incompatible with our torch 2.9 install causing ``` RuntimeError: PyTorch version mismatch! DeepSpeed ops were compiled and installed with a different version than what is being used at runtime. Please re-install DeepSpeed or switch torch versions. Install torch version=2.11, Runtime torch version=2.9 ``` This PR fixes it through adding `--no-binary` to `uv` for `deepspeed` to ensure that deepspeed is built locally using the current torch version. In this future this could be removed. Signed-off-by: Mark Towers <[email protected]> Co-authored-by: Mark Towers <[email protected]>
…ch 2.7 special case (#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 #65114) needs a `langchain-core` requiring `jsonpatch>=1.33`; 1.32 was a 2023 tier-split snapshot pin (#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](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
…dead data.pyg.org find-links (ray-project#65899) ## Description `data.pyg.org` — the only host that ever served prebuilt wheels for the PyTorch Geometric extensions — has been a dangling CNAME since 2026-09-02 ([pyg-team/pyg-lib#719](pyg-team/pyg-lib#719)). Every ML/data/rllib/doc/windows depset declared it as `--find-links`, and uv fails eagerly on an unreadable find-links URL, so `raydepsets: compile all dependencies` has been red on master (postmerge 19501, 19507) and was made `soft_fail` in ray-project#65880. The same URL is line 2 of every affected lock, so any cache-miss rebuild of the `mlbuild`/`mlgpubuild`/`mllightning1gpubuild` images (and the core/rllib/doc GPU images) fails at `uv pip install -r <lock>` too. This PR narrows the dependency on `data.pyg.org` to the one package that needs it, sources `torch-scatter` from Astral's index, and re-enables the hard failure: - **`torch-scatter` now comes from Astral's GPU indexes** (`https://wheels.astral.sh/simple/{cpu,cu128}/`). These are real PEP 503/691 indexes, so the requirement files use `--extra-index-url` instead of a flat find-links page. Versions encode the torch minor: `2.1.2+cpu.torch.2.9` / `2.1.2+cu.12.8.torch.2.9`. Astral publishes manylinux wheels only, so the CPU pin carries `; sys_platform == 'linux'`; nothing in Ray imports `torch_scatter` on any platform. - **`torch-sparse` stays, still from `data.pyg.org`** (which came back on 2026-09-03; pyg-lib#719 closed). It is required: `torch_geometric.loader.NeighborSampler.__init__` builds a `SparseTensor` from `torch_geometric.typing`, whose stub raises `ImportError: 'SparseTensor' requires 'torch-sparse'` when the package is absent — verified empirically on torch 2.9.0 + torch-geometric 2.5.3 — and `python/ray/train/examples/pytorch_geometric/distributed_sage_example.py` (CI test `distributed_sage_example`, `train_v2_gpu`) uses it. `torch_sparse` also imports `torch_scatter` in 8 modules, so scatter is a hard dependency of sparse. No other wheel source for torch-sparse exists (PyPI is sdist-only; not on Astral, `download.pytorch.org` or `pypi.nvidia.com`; no GitHub release assets), so the `--find-links` for it remains and this PR does **not** remove the dependency on that host — it narrows it to one package. Pinned explicitly (`+pt29cpu` / `+pt29cu128`) so a missing wheel fails loudly instead of falling back to the sdist. - **`torch-cluster` and `torch-spline-conv` are dropped.** Nothing in `python/`, `rllib/`, `release/` or `doc/` imports them, `torch-geometric==2.5.3` lists none of the four in `requires_dist`, and the example's full path (FakeDataset → RandomNodeSplit → NeighborSampler → SAGEConv) trains with only scatter + sparse installed (run in a glibc-2.36 container against the exact pinned wheels). - Both remaining extensions are gated on `sys_platform == 'linux'`: Astral ships manylinux wheels only, `torch_sparse` cannot import without `torch_scatter`, and nothing on Windows or macOS uses PyG. Windows therefore loses the four `+pt27cpu` pins, their find-links, and the matching `relaxed_windows_tests` entries. - **`deepspeed`: `>=0.12.3` → `===0.18.9`** in `train-requirements.txt` (PEP 440 *arbitrary equality*; the compiled constraint follows as `deepspeed==0.18.9` → `deepspeed===0.18.9`). Why: Astral's cu128 index also publishes `deepspeed 0.18.9+cu.12.8.torch.2.9` (prebuilt CUDA ops). Under PEP 440 a bare `==0.18.9` *matches* that local version, and `--index-strategy unsafe-best-match` prefers it, so without this every GPU depset would silently switch to Astral's deepspeed build and pull in `nvidia-ml-py` (verified with `uv pip compile`). `===` is the only specifier that excludes local versions, so deepspeed stays on the PyPI build it uses today; uv honours it as requirement and constraint, and pip-tools writes it through to `requirements_compiled.txt`. The resolved version is unchanged (0.18.9 before and after). If we ever *want* Astral's prebuilt-ops deepspeed, the opt-in is the reverse edit, `===` → `==` — not part of this PR. - **`ci/ci.sh compile_pip_dependencies`**: the `+cpu`-stripping sed now removes the whole local segment. The compiled file is the GPU depsets' constraint (via the `requirements_compiled_py3.1x.txt` symlinks), and only a bare `torch-scatter==2.1.2` lets `+cu.12.8.torch.2.9` satisfy it; the old `[^\b]*cpu` pattern would have left `2.1.2.torch.2.9`. - `.buildkite/dependencies.rayci.yml`: `soft_fail` and its comment removed — the job hard-fails again. - Also: dead `--find-links` removed from `release/ray_release/byod/requirements_ml_byod_3.10.txt` (it pinned none of the four); docs and stale comments updated. Regenerated: `python/requirements_compiled.txt` (`./ci/ci.sh compile_pip_dependencies`, py3.11 + pip-tools 7.4.1) and all 32 affected locks under `python/deplocks/` (`bazel run //ci/raydepsets:raydepsets -- build --all-configs`). Package-level delta in every lock is only the PyG lines; deepspeed stays `0.18.9`, no new packages. `python/requirements_compiled_py3.14.txt` has no generator (it pins torch 2.7.0, which has no cp314 wheels) and has always been maintained by mirroring the hunks applied to `requirements_compiled.txt` (ray-project#65616, ray-project#65046, ray-project#64056 all changed identical pin counts in both), so the same header/pin deltas were applied to it by hand; its own `torch-2.7.0+cpu` find-links is kept to match its torch pin. That line is only ever read by pip: `requirements_compiled_py${PYTHON_VERSION}.txt` is staged into the `base-deps`/`base-slim` images as `/home/ray/requirements_compiled.txt` (those images install from the rayimg *lock* with uv, not from this file) and then used as `-c` by `ci/docker/ray-image.Dockerfile`, `docker/ray/Dockerfile` and `runtime_env_container/Dockerfile` — all `pip install -c`. pip treats an unreachable `--find-links` in a constraints file as a warning (5 retries, exit 0; verified against an NXDOMAIN host), whereas uv fails eagerly (exit 2; also verified). The only uv consumer is raydepsets, whose pre-hook strips the header lines. So no py3.10–3.14 image build hard-fails on that line even if data.pyg.org goes dark again; the uv exposure is the `--find-links` emitted into the ML/data/rllib/doc *locks*, which this PR narrows to torch-sparse. Left untouched, flagged for follow-up: `release/ray_release/byod/byod_horovod*.sh` (install torch-2.0.1-era PyG wheels from the same dead host — separate, older problem), `ci/raydepsets/tests/test_cli.py` (fixture strings only). ## Related issues Follows up ray-project#65880 (temporary `soft_fail`). Upstream: pyg-team/pyg-lib#719, pytorch_geometric#10793, pytorch_geometric#10716. ## Additional information Not a duplicate: no open PR touches `data.pyg.org`, `wheels.astral.sh`, or the PyG pins (searched `pyg`, `astral`, `find-links`, `torch-scatter`, `data.pyg.org`; only unrelated dependabot torch bumps match). Tests run locally: - `./ci/ci.sh compile_pip_dependencies` in a py3.11 venv → exit 0; diff vs master is exactly the two header lines, the PyG pins/markers and `deepspeed===` - `bazel run //ci/raydepsets:raydepsets -- build --all-configs` → exit 0, 107 depsets compiled; the 32 changed locks differ from master only in the PyG lines and the index/find-links header, and the `torch-sparse` hashes are unchanged - `bazel run //ci/raydepsets:raydepsets -- build --all-configs --check` (CI's exact command) → exit 0, all 107 depsets regenerate byte-identically (including the py3.14-constrained ones against the mirrored snapshot), working tree clean afterwards - PyG minimal-set check in `python:3.10-bookworm`: the example's path trains with scatter+sparse only; fails without sparse, and sparse fails without scatter - `pre-commit run --files <changed source files>` → shellcheck, semgrep pass - `uv pip compile` probes: `torch-scatter==2.1.2+cu.12.8.torch.2.9` resolves from `wheels.astral.sh/simple/cu128/`; `deepspeed==0.18.9` flips to `0.18.9+cu.12.8.torch.2.9` with that index present, `deepspeed===0.18.9` does not. 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 Barnwell <[email protected]> Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
…ay-project#65936) ## Description ray-project#65899 added astral's cu128 index for torch-scatter support, however, at the same time, started pulling in a DeepSpeed wheel that was compiled with torch 2.11 This wheel is incompatible with our torch 2.9 install causing ``` RuntimeError: PyTorch version mismatch! DeepSpeed ops were compiled and installed with a different version than what is being used at runtime. Please re-install DeepSpeed or switch torch versions. Install torch version=2.11, Runtime torch version=2.9 ``` This PR fixes it through adding `--no-binary` to `uv` for `deepspeed` to ensure that deepspeed is built locally using the current torch version. In this future this could be removed. Signed-off-by: Mark Towers <[email protected]> Co-authored-by: Mark Towers <[email protected]>
…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]>
Description
data.pyg.org— the only host that ever served prebuilt wheels for the PyTorch Geometric extensions — has been a dangling CNAME since 2026-09-02 (pyg-team/pyg-lib#719). Every ML/data/rllib/doc/windows depset declared it as--find-links, and uv fails eagerly on an unreadable find-links URL, soraydepsets: compile all dependencieshas been red on master (postmerge 19501, 19507) and was madesoft_failin #65880. The same URL is line 2 of every affected lock, so any cache-miss rebuild of themlbuild/mlgpubuild/mllightning1gpubuildimages (and the core/rllib/doc GPU images) fails atuv pip install -r <lock>too.This PR narrows the dependency on
data.pyg.orgto the one package that needs it, sourcestorch-scatterfrom Astral's index, and re-enables the hard failure:torch-scatternow comes from Astral's GPU indexes (https://wheels.astral.sh/simple/{cpu,cu128}/). These are real PEP 503/691 indexes, so the requirement files use--extra-index-urlinstead of a flat find-links page. Versions encode the torch minor:2.1.2+cpu.torch.2.9/2.1.2+cu.12.8.torch.2.9. Astral publishes manylinux wheels only, so the CPU pin carries; sys_platform == 'linux'; nothing in Ray importstorch_scatteron any platform.torch-sparsestays, still fromdata.pyg.org(which came back on 2026-09-03; pyg-lib#719 closed). It is required:torch_geometric.loader.NeighborSampler.__init__builds aSparseTensorfromtorch_geometric.typing, whose stub raisesImportError: 'SparseTensor' requires 'torch-sparse'when the package is absent — verified empirically on torch 2.9.0 + torch-geometric 2.5.3 — andpython/ray/train/examples/pytorch_geometric/distributed_sage_example.py(CI testdistributed_sage_example,train_v2_gpu) uses it.torch_sparsealso importstorch_scatterin 8 modules, so scatter is a hard dependency of sparse. No other wheel source for torch-sparse exists (PyPI is sdist-only; not on Astral,download.pytorch.orgorpypi.nvidia.com; no GitHub release assets), so the--find-linksfor it remains and this PR does not remove the dependency on that host — it narrows it to one package. Pinned explicitly (+pt29cpu/+pt29cu128) so a missing wheel fails loudly instead of falling back to the sdist.torch-clusterandtorch-spline-convare dropped. Nothing inpython/,rllib/,release/ordoc/imports them,torch-geometric==2.5.3lists none of the four inrequires_dist, and the example's full path (FakeDataset → RandomNodeSplit → NeighborSampler → SAGEConv) trains with only scatter + sparse installed (run in a glibc-2.36 container against the exact pinned wheels).sys_platform == 'linux': Astral ships manylinux wheels only,torch_sparsecannot import withouttorch_scatter, and nothing on Windows or macOS uses PyG. Windows therefore loses the four+pt27cpupins, their find-links, and the matchingrelaxed_windows_testsentries.deepspeed:>=0.12.3→===0.18.9intrain-requirements.txt(PEP 440 arbitrary equality; the compiled constraint follows asdeepspeed==0.18.9→deepspeed===0.18.9). Why: Astral's cu128 index also publishesdeepspeed 0.18.9+cu.12.8.torch.2.9(prebuilt CUDA ops). Under PEP 440 a bare==0.18.9matches that local version, and--index-strategy unsafe-best-matchprefers it, so without this every GPU depset would silently switch to Astral's deepspeed build and pull innvidia-ml-py(verified withuv pip compile).===is the only specifier that excludes local versions, so deepspeed stays on the PyPI build it uses today; uv honours it as requirement and constraint, and pip-tools writes it through torequirements_compiled.txt. The resolved version is unchanged (0.18.9 before and after). If we ever want Astral's prebuilt-ops deepspeed, the opt-in is the reverse edit,===→==— not part of this PR.ci/ci.sh compile_pip_dependencies: the+cpu-stripping sed now removes the whole local segment. The compiled file is the GPU depsets' constraint (via therequirements_compiled_py3.1x.txtsymlinks), and only a baretorch-scatter==2.1.2lets+cu.12.8.torch.2.9satisfy it; the old[^\b]*cpupattern would have left2.1.2.torch.2.9..buildkite/dependencies.rayci.yml:soft_failand its comment removed — the job hard-fails again.--find-linksremoved fromrelease/ray_release/byod/requirements_ml_byod_3.10.txt(it pinned none of the four); docs and stale comments updated.Regenerated:
python/requirements_compiled.txt(./ci/ci.sh compile_pip_dependencies, py3.11 + pip-tools 7.4.1) and all 32 affected locks underpython/deplocks/(bazel run //ci/raydepsets:raydepsets -- build --all-configs). Package-level delta in every lock is only the PyG lines; deepspeed stays0.18.9, no new packages.python/requirements_compiled_py3.14.txthas no generator (it pins torch 2.7.0, which has no cp314 wheels) and has always been maintained by mirroring the hunks applied torequirements_compiled.txt(#65616, #65046, #64056 all changed identical pin counts in both), so the same header/pin deltas were applied to it by hand; its owntorch-2.7.0+cpufind-links is kept to match its torch pin. That line is only ever read by pip:requirements_compiled_py${PYTHON_VERSION}.txtis staged into thebase-deps/base-slimimages as/home/ray/requirements_compiled.txt(those images install from the rayimg lock with uv, not from this file) and then used as-cbyci/docker/ray-image.Dockerfile,docker/ray/Dockerfileandruntime_env_container/Dockerfile— allpip install -c. pip treats an unreachable--find-linksin a constraints file as a warning (5 retries, exit 0; verified against an NXDOMAIN host), whereas uv fails eagerly (exit 2; also verified). The only uv consumer is raydepsets, whose pre-hook strips the header lines. So no py3.10–3.14 image build hard-fails on that line even if data.pyg.org goes dark again; the uv exposure is the--find-linksemitted into the ML/data/rllib/doc locks, which this PR narrows to torch-sparse.Left untouched, flagged for follow-up:
release/ray_release/byod/byod_horovod*.sh(install torch-2.0.1-era PyG wheels from the same dead host — separate, older problem),ci/raydepsets/tests/test_cli.py(fixture strings only).Related issues
Follows up #65880 (temporary
soft_fail). Upstream: pyg-team/pyg-lib#719, pytorch_geometric#10793, pytorch_geometric#10716.Additional information
Not a duplicate: no open PR touches
data.pyg.org,wheels.astral.sh, or the PyG pins (searchedpyg,astral,find-links,torch-scatter,data.pyg.org; only unrelated dependabot torch bumps match).Tests run locally:
./ci/ci.sh compile_pip_dependenciesin a py3.11 venv → exit 0; diff vs master is exactly the two header lines, the PyG pins/markers anddeepspeed===bazel run //ci/raydepsets:raydepsets -- build --all-configs→ exit 0, 107 depsets compiled; the 32 changed locks differ from master only in the PyG lines and the index/find-links header, and thetorch-sparsehashes are unchangedbazel run //ci/raydepsets:raydepsets -- build --all-configs --check(CI's exact command) → exit 0, all 107 depsets regenerate byte-identically (including the py3.14-constrained ones against the mirrored snapshot), working tree clean afterwardspython:3.10-bookworm: the example's path trains with scatter+sparse only; fails without sparse, and sparse fails without scatterpre-commit run --files <changed source files>→ shellcheck, semgrep passuv pip compileprobes:torch-scatter==2.1.2+cu.12.8.torch.2.9resolves fromwheels.astral.sh/simple/cu128/;deepspeed==0.18.9flips to0.18.9+cu.12.8.torch.2.9with that index present,deepspeed===0.18.9does not.AI assistance (Claude Code) was used for this change; every changed line was reviewed by the submitter.
🤖 Generated with Claude Code