Repository navigation
[train][deps] Move the PyG example to NeighborLoader/pyg-lib and drop torch-sparse, torch-scatter and the data.pyg.org find-links - #65931
elliot-barn wants to merge 3 commits into
Conversation
…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]>
…(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]>
… torch-sparse, torch-scatter and the data.pyg.org find-links torch-sparse had one consumer: torch_geometric.loader.NeighborSampler in python/ray/train/examples/pytorch_geometric/distributed_sage_example.py, which builds a SparseTensor in __init__ and raises ImportError without it. Every PyG sampling loader needs torch-sparse or pyg-lib; pyg-lib has no torch-2.9 build anywhere, but Astral publishes it for torch 2.10 (0.8.0+cpu.torch.2.10 / +cu.12.8.torch.2.10, cp310-abi3), so after the fleet bump the example can use the modern NeighborLoader and keep neighbor sampling. - Example: NeighborSampler -> NeighborLoader. Same model, same [25, 10] fan-out, same rank-0 layer-wise full-graph inference, same CLI. The PyG loaders yield Data objects Ray's device mover does not understand and are already sharded per rank via input_nodes, so they no longer go through train.torch.prepare_data_loader; batches are moved to the device explicitly. Verified end to end (2 workers, --dataset fake, Ray Train v2) with torch 2.10.0+cpu, torch-geometric 2.5.3 and pyg-lib 0.8.0 and neither torch_sparse nor torch_scatter installed; also passes on torch-geometric 2.8.0.post1. - Requirements: torch-sparse and torch-scatter dropped (scatter was only ever needed by sparse; nothing in Ray imports either); pyg-lib added from the Astral index; both --find-links https://data.pyg.org/... lines removed. data.pyg.org now appears only as a fixture string in ci/raydepsets/tests. - Dead code: byod_horovod_test.sh / byod_horovod_master_test.sh deleted; they installed torch-2.0.1-era PyG wheels from data.pyg.org, are referenced by nothing, and python/ray/train/horovod no longer exists. requirements_compiled.txt regenerated, requirements_compiled_py3.14.txt mirrored by hand, locks recompiled. 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) dependencies by replacing the older torch-scatter and torch-sparse extensions with pyg-lib across requirement and lock files. Additionally, it updates the distributed_sage_example.py example to use NeighborLoader instead of the deprecated NeighborSampler. A critical issue was identified in the newly added inference method of the SAGE model in distributed_sage_example.py, where node features are not updated between layers and a return statement is missing.
| def inference(self, x_all, subgraph_loader, device): | ||
| # Layer-wise inference over the full graph: the representations of all | ||
| # nodes are computed one layer at a time, so only a batch of nodes and | ||
| # their direct neighbors need to be on the device at once. | ||
| for i, conv in enumerate(self.convs): | ||
| xs = [] | ||
| for batch_size, n_id, adj in subgraph_loader: | ||
| edge_index, _, size = adj | ||
| x = x_all[n_id.to(x_all.device)].to(train.torch.get_device()) | ||
| x_target = x[: size[1]] | ||
| x = self.convs[i]((x, x_target), edge_index) | ||
| for batch in subgraph_loader: | ||
| x = x_all[batch.n_id].to(device) | ||
| x = conv(x, batch.edge_index.to(device)) | ||
| # The seed nodes of a batch are always placed first. | ||
| x = x[: batch.batch_size] | ||
| if i != self.num_layers - 1: | ||
| x = F.relu(x) | ||
| xs.append(x.cpu()) |
There was a problem hiding this comment.
The implementation of layer-wise inference in the inference method is incorrect. The node features x_all are not updated between layers. For layer-wise inference, the output embeddings from one layer should be used as input for the next. This requires updating x_all at the end of each layer's computation.
Additionally, the method is missing a return statement. It should return the final node embeddings.
Here is a corrected implementation based on the standard PyG example for layer-wise inference:
| def inference(self, x_all, subgraph_loader, device): | |
| # Layer-wise inference over the full graph: the representations of all | |
| # nodes are computed one layer at a time, so only a batch of nodes and | |
| # their direct neighbors need to be on the device at once. | |
| for i, conv in enumerate(self.convs): | |
| xs = [] | |
| for batch_size, n_id, adj in subgraph_loader: | |
| edge_index, _, size = adj | |
| x = x_all[n_id.to(x_all.device)].to(train.torch.get_device()) | |
| x_target = x[: size[1]] | |
| x = self.convs[i]((x, x_target), edge_index) | |
| for batch in subgraph_loader: | |
| x = x_all[batch.n_id].to(device) | |
| x = conv(x, batch.edge_index.to(device)) | |
| # The seed nodes of a batch are always placed first. | |
| x = x[: batch.batch_size] | |
| if i != self.num_layers - 1: | |
| x = F.relu(x) | |
| xs.append(x.cpu()) | |
| def inference(self, x_all, subgraph_loader, device): | |
| # Layer-wise inference over the full graph: the representations of all | |
| # nodes are computed one layer at a time, so only a batch of nodes and | |
| # their direct neighbors need to be on the device at once. | |
| for i, conv in enumerate(self.convs): | |
| xs = [] | |
| for batch in subgraph_loader: | |
| x = x_all[batch.n_id].to(device) | |
| x = conv(x, batch.edge_index.to(device)) | |
| # The seed nodes of a batch are always placed first. | |
| x = x[: batch.batch_size] | |
| if i != self.num_layers - 1: | |
| x = F.relu(x) | |
| xs.append(x.cpu()) | |
| x_all = torch.cat(xs, dim=0) | |
| return x_all |
|
Reviewed end to end from a docs / example-lifecycle lens. Verdict: solid and ship-worthy. The lockfile churn is mechanical; the real content is the SAGE example rewrite and the prose/comment updates, and both are correct and internally consistent — a clean Example rewrite — correct and idiomatic
One thing worth confirming before merge The example's only automated coverage is the Deps and prose Cross-checked and consistent: the This review was generated by Claude Code and is shared as-is; I haven't independently re-verified every claim above. |
|
This pull request has been automatically marked as stale because it has not had 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. |
## 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]>
… 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]>
…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]>
… 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]>
Description
Removes
torch-sparse— and with it the last--find-linksondata.pyg.org— from the repo.torch-sparsehad exactly one consumer:torch_geometric.loader.NeighborSamplerinpython/ray/train/examples/pytorch_geometric/distributed_sage_example.py, which builds aSparseTensorin__init__and raisesImportError: 'SparseTensor' requires 'torch-sparse'without it (#65899 kept the pin for that reason). Every sampling loader in PyG needs eithertorch-sparseorpyg-lib;pyg-libhas no torch-2.9 build anywhere, but Astral publishes it for torch 2.10 (pyg_lib-0.8.0+cpu.torch.2.10,+cu.12.8.torch.2.10, cp310-abi3), so after #65909 the example can move to the modernNeighborLoaderand keep neighbor sampling.NeighborSampler(deprecated upstream,(batch_size, n_id, adjs)triples, needstorch-sparse) →NeighborLoader(yieldsDatabatches with the seed nodes first, needspyg-lib). Same model, same[25, 10]fan-out, same rank-0 layer-wise full-graph inference, same CLI. The PyG loaders are no longer passed throughtrain.torch.prepare_data_loader— they yieldDataobjects Ray's device mover doesn't understand, the loader is already sharded per rank viainput_nodes, and the batch is moved to the device explicitly. Verified end-to-end (2 workers,--dataset fake, Ray Train v2) in apython:3.10-bookwormcontainer with torch 2.10.0+cpu andpyg-lib0.8.0, with neithertorch_sparsenortorch_scatterinstalled: trains and reports accuracies withtorch-geometric 2.5.3(loss 1.6116) and also with 2.8.0.post1 (loss 1.6084), so the pinned 2.5.3 is kept.torch-sparseandtorch-scatterdropped (scatter was only ever needed by sparse; nothing in Ray imports either),pyg-lib==0.8.0+cpu.torch.2.10/+cu.12.8.torch.2.10added from the Astral index that [ci][deps] Source torch-scatter from Astral's GPU index and drop the dead data.pyg.org find-links #65899 introduced, both--find-links https://data.pyg.org/...lines removed.torch-geometricstays at 2.5.3 — it drivespyg-lib0.8.0 fine (verified), so no PyG bump rides along.release/ray_release/byod/byod_horovod_test.shandbyod_horovod_master_test.shdeleted — they installed torch-2.0.1-era PyG wheels fromdata.pyg.org, are referenced by nothing (no release yaml, no other file; last touched 2025-02), andpython/ray/train/horovodno longer exists.requirements_compiled.txtregenerated,requirements_compiled_py3.14.txtmirrored by hand as usual, 30 locks recompiled.After this,
data.pyg.orgappears in the repo only as a fixture string inci/raydepsets/tests/test_cli.py.Related issues
Follows #65899 (torch-scatter to Astral, torch-sparse kept) and #65909 (torch 2.10 — what makes
pyg-libavailable). pyg-team/pyg-lib#719 (the outage that started this), pytorch_geometric#10716 (upstream deprecation of the four extensions).Additional information
Not a duplicate: no open PR touches the PyG extensions or the SAGE example.
Tests run locally:
FakeDataset, in Docker as above → exit 0 on both torch-geometric 2.5.3 and 2.8.0.post1./ci/ci.sh compile_pip_dependencies→ exit 0; diff is exactly the find-links line,pyg-lib==0.8.0in,torch-scatter/torch-sparseoutbazel run //ci/raydepsets:raydepsets -- build --all-configs→ exit 0, 105 depsets; across the 30 changed locks the only pin-level delta is the three PyG lines (19 CPU + 11 GPU), anddata.pyg.orgno longer appears in any lockbazel run //ci/raydepsets:raydepsets -- build --all-configs --check→ exit 0, all 105 depsets regenerate byte-identicallyAI assistance (Claude Code) was used for this change; every changed line was reviewed by the submitter.
🤖 Generated with Claude Code