Skip to content

[ci][images] Build the ray-torch image for Python 3.11 - #65774

Merged
elliot-barn merged 1 commit into
masterfrom
elliot-barn/ray-torch-py311-image
Aug 30, 2026
Merged

elliot-barn merged 1 commit into
masterfrom
elliot-barn/ray-torch-py311-image

Conversation

@elliot-barn

@elliot-barn elliot-barn commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

What

Builds the cu12.8 ray-torch image for Python 3.11 alongside the existing 3.14 one.

File Change
ci/raydepsets/configs/ray_torch.depsets.yaml py311_cuda128 build arg set; depset split per Python version
python/deplocks/ray-torch/ray-torch-cu128_base_py3.11.lock new
docker/ray-torch/torch-constraints-py3.14.txt new — py3.14's pins (see below)
docker/ray-torch/torch-requirements.txt 3.14-only pins moved out; two py3.11 exclusions
docker/ray-torch/cuda.wanda.yaml pass PYTHON_VERSION to the Dockerfile
.buildkite/release/build.rayci.yml "3.11" added to the two build steps and the publish step
...ray-torch-cu128_base_py3.14.lock provenance comments only, no version moves

No release test is changed here; that is #65775.

Where the versions come from

py3.11 is constrained by Ray's own compiled requirements, through the same remove-compiled-headers.sh pre-hook the CI depsets use:

constraints:
  - /tmp/ray-deps/requirements_compiled_py${PYTHON_VERSION}.txt
pre_hooks:
  - ci/raydepsets/pre_hooks/remove-compiled-headers.sh ${PYTHON_VERSION}

So the image follows what Ray declares — torch 2.9.0+cu128, numba 0.61.2, llvmlite 0.44.0, cupy-cuda12x 13.6.0, pytest 7.4.4. That is also the torch the py3.10 ray-ml image runs, so a py3.10-ray-ml vs py3.11-ray-torch comparison isolates the Python version rather than mixing in a torch change.

py3.14 cannot use the same source. requirements_compiled_py3.14.txt pins torch==2.7.0, which publishes no cp314 wheels:

Because only the following versions of torch are available: torch<=2.7.0, torch>=2.7.0+cu128
and torch>=2.7.0,<=2.7.0+cu128 has no wheels with a matching Python ABI tag (e.g. cp314) ...
your requirements are unsatisfiable.
hint: we only found wheels for torch (v2.7.0+cu128) with ABI tags: cp39, cp310, cp311, cp312, cp313, cp313t

It keeps a small constraints file holding the versions it already resolves to, so its lock does not move. The # necessary changes for 3.14 pins move there as well, because torch-requirements.txt is shared with py3.11 and those exact pins (numba 0.65.0, llvmlite 0.47.0, cupy-cuda12x 14.0.1, dm-tree 0.1.10) conflict with the py3.11 compiled set.

Hence the two depset definitions, with a TODO at the top of the config to unify them once both images can share one constraints source.

Cost of following the compiled pins on py3.11

Both are marked inline in torch-requirements.txt:

  • locust resolves to 2.39.1, not 2.44.3 — 2.44.3 requires pytest>=8.3.3 and the py3.11 compiled set pins pytest==7.4.4. (py3.14 pins pytest==8.3.3, so it keeps 2.44.3.)
  • langchain-text-splitters is excluded on 3.11 — every release needs a langchain-core requiring jsonpatch>=1.33, while compiled pins jsonpatch==1.32. No version combination satisfies both.
  • Worth noting: torchmetrics is 0.10.3 on py3.11 (the compiled pin) versus 1.9.0 on py3.14.

The wanda build arg

docker/ray-torch/Dockerfile derives the lock path from its own ARG:

ARG PYTHON_VERSION=3.14
ARG PYTHON_DEPSET=python/deplocks/ray-torch/${IMAGE_TYPE}_base_py${PYTHON_VERSION}.lock
COPY "$PYTHON_DEPSET" /home/ray/python_depset.lock

cuda.wanda.yaml was passing only FULL_BASE_IMAGE and IMAGE_TYPE, so on a 3.11 build the ARG kept its 3.14 default while srcs placed only the 3.11 lock in the context. Latent until now, because with 3.14 the only version built the default happened to match. Reproduced with the same ARG/COPY logic over a context holding just the 3.11 lock:

# before: PYTHON_VERSION not passed
ERROR: failed to compute cache key: "/python/deplocks/ray-torch/ray-torch-cu128_base_py3.14.lock": not found

# after: --build-arg PYTHON_VERSION=3.11
sha256:a61568edcd9a8c7da71da655da6ae0274f55430cf6d34e3a419ec67cda04b4a9

The pass-through matches docker/base-deps/, docker/base-slim/, docker/base-extra-testdeps/ and ci/docker/ray-torch-anyscale-cuda.wanda.yaml, which all already list a bare PYTHON_VERSION.

Everything else 3.11 needs already exists

Dependency Coverage
raycudabaseextra (ray-py3.11-cu12.8.1-cudnn-base-extra) python 3.10–3.14 × cuda incl. 12.8.1-cudnn
ray-wheel-build 3.10–3.14
push_release_test_image takes --python-version; nothing hardcoded

Testing

$ bazelisk run //ci/raydepsets:raydepsets -- build ci/raydepsets/configs/ray_torch.depsets.yaml
  ray_torch_cu128_base_depset_311 compiled successfully
  ray_torch_cu128_base_depset_314 compiled successfully

$ bazelisk run //ci/raydepsets:raydepsets -- build ci/raydepsets/configs/ray_torch.depsets.yaml --check
  Lock files are up to date.

Resulting py3.11 lock: torch 2.9.0+cu128, torchvision 0.24.0+cu128, 15 nvidia-*-cu12 packages at 12.8.x, 0 CUDA 13 packages, 304 packages total. The CUDA check matters because torch is unpinned in torch-requirements.txt and the compile sees both PyPI and download.pytorch.org/whl/cu128 under --index-strategy unsafe-best-match; without a pin the resolve can land a CUDA 13 stack inside an image based on cu12.8.1-cudnn.

The py3.14 lock diff is # via -c ... provenance lines only — no version changes — so the image that lock backs is unchanged.

Note that buildkite/microcheck does not build release images, so the real verification is the release pipeline building ray-torch.py3.11.cu12.8.1-cudnn.base and ray-torch-anyscale py3.11; that run is on #65775.

Not a duplicate

gh pr list --state open --search "ray-torch python 3.11" and --search "ray_torch depsets" both return nothing.

AI assistance

AI assistance was used: adding the build arg set, generating the lock, diagnosing the CUDA 13 resolution and the wanda build-arg failure, and confirming which constraint sources are usable per Python version. Every changed line was reviewed and every command and output quoted above was run and confirmed.

@elliot-barn
elliot-barn requested review from a team as code owners August 28, 2026 19:31

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request adds support for Python 3.11 in the CUDA 12.8 Ray-Torch release builds. It introduces a new constraints file (docker/ray-torch/torch-cu128-constraints.txt) to pin torch and torchvision to their CUDA 12.8 builds, preventing PyPI from pulling in incompatible CUDA 13 wheels. The Buildkite configuration, dependency set configurations, and lock files have been updated accordingly. There are no review comments, so I have no feedback to provide.

@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 ef2b14c. Configure here.

wanda: docker/ray-torch/cuda.wanda.yaml
array:
python:
- "3.11"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

3.11 image build uses wrong lock

High Severity

Adding 3.11 to ray-torchcudabase still leaves PYTHON_VERSION out of docker/ray-torch/cuda.wanda.yaml build_args. The Dockerfile therefore keeps its 3.14 default and COPY requests the 3.14 lock, while wanda only puts the 3.11 lock in the context, so the 3.11 image fails to build.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ef2b14c. Configure here.

@elliot-barn
elliot-barn force-pushed the elliot-barn/ray-torch-py311-image branch from ef2b14c to 7f066ae Compare August 28, 2026 19:53
@elliot-barn
elliot-barn force-pushed the elliot-barn/ray-torch-py311-image branch from 7f066ae to 2badd98 Compare August 28, 2026 20:19
@elliot-barn
elliot-barn force-pushed the elliot-barn/ray-torch-py311-image branch 5 times, most recently from ec5e01c to 8f9afaf Compare August 28, 2026 21:37
@elliot-barn

Copy link
Copy Markdown
Collaborator Author

Good catch — confirmed and fixed in 8f9afaf.

docker/ray-torch/Dockerfile derives the lock path from the ARG:

ARG PYTHON_VERSION=3.14
ARG PYTHON_DEPSET=python/deplocks/ray-torch/${IMAGE_TYPE}_base_py${PYTHON_VERSION}.lock
COPY "$PYTHON_DEPSET" /home/ray/python_depset.lock

and cuda.wanda.yaml was passing only FULL_BASE_IMAGE and IMAGE_TYPE, so the ARG kept its 3.14 default while srcs placed only ...py3.11.lock in the context.

Reproduced with a minimal context containing just the 3.11 lock and the same ARG/COPY logic:

# PYTHON_VERSION not passed (before the fix)
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref ...:
  "/python/deplocks/ray-torch/ray-torch-cu128_base_py3.14.lock": not found

# --build-arg PYTHON_VERSION=3.11 (after the fix)
sha256:a61568edcd9a8c7da71da655da6ae0274f55430cf6d34e3a419ec67cda04b4a9

The fix adds the pass-through, matching what docker/base-deps/cuda.wanda.yaml, docker/base-slim/cuda.wanda.yaml, docker/base-extra-testdeps/cuda.wanda.yaml and ci/docker/ray-torch-anyscale-cuda.wanda.yaml already do:

build_args:
  - FULL_BASE_IMAGE=cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra
  - PYTHON_VERSION
  - IMAGE_TYPE

This was latent rather than new: with 3.14 the only version built, the Dockerfile default happened to match the lock in the context, so nothing surfaced it until a second version was added.

@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core devprod labels Aug 28, 2026
@elliot-barn elliot-barn added the go add ONLY when ready to merge, run all tests label Aug 29, 2026
Adds a py3.11 variant of the cu12.8 ray-torch image so it can be referenced
alongside the existing py3.14 one:

- ci/raydepsets/configs/ray_torch.depsets.yaml: new py311_cuda128 build arg set
- python/deplocks/ray-torch/ray-torch-cu128_base_py3.11.lock: generated
- .buildkite/release/build.rayci.yml: "3.11" added to ray-torchcudabase,
  ray-torch-anyscale-cuda-build and the publish step

Everything the image depends on already covers 3.11: raycudabaseextra builds
python 3.10-3.14 against cu12.8.1-cudnn, ray-wheel-build covers 3.11, and both
wanda files and push_release_test_image are parameterised by PYTHON_VERSION.

The depset is split in two, with a TODO to unify. py3.11 is constrained by
requirements_compiled_py${PYTHON_VERSION}.txt through the same pre_hook the CI
depsets use, so the image follows Ray's own pinned versions: torch 2.9.0+cu128,
numba 0.61.2, llvmlite 0.44.0, cupy-cuda12x 13.6.0, pytest 7.4.4. That is the
torch the py3.10 ray-ml image already runs, so comparing py3.10 ray-ml against
py3.11 ray-torch is a test of the Python version rather than of torch.

py3.14 cannot use the same source: requirements_compiled_py3.14.txt pins torch
2.7.0, which publishes no cp314 wheels, so that resolve fails outright. It keeps
a small constraints file of its own instead, holding the versions the image
already resolves to. The "necessary changes for 3.14" pins move there from
torch-requirements.txt, which is shared with py3.11 and conflicts with the
py3.11 compiled pins. No version moves in the py3.14 lock; its only diff is
provenance comments.

Two consequences for the py3.11 image, both from following Ray's compiled pins:
locust resolves to 2.39.1 rather than 2.44.3 (2.44.3 needs pytest>=8.3.3, and
compiled pins pytest 7.4.4), and langchain-text-splitters is excluded, because
every release of it needs a langchain-core requiring jsonpatch>=1.33 while
compiled pins jsonpatch 1.32. Both are marked in torch-requirements.txt.

docker/ray-torch/cuda.wanda.yaml also has to pass PYTHON_VERSION through to the
Dockerfile. Its ARG defaults to 3.14 and builds the depset path from it, while
wanda only puts the matching lock in the build context, so a 3.11 build looked
for ray-torch-cu128_base_py3.14.lock and failed on a file that is not there.
This never showed up before because the default matched the only version built.

Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn force-pushed the elliot-barn/ray-torch-py311-image branch from 8f9afaf to 2819643 Compare August 29, 2026 00:40
@elliot-barn
elliot-barn merged commit 36b2c54 into master Aug 30, 2026
6 checks passed
@elliot-barn
elliot-barn deleted the elliot-barn/ray-torch-py311-image branch August 30, 2026 19:31
elliot-barn added a commit that referenced this pull request Sep 1, 2026
…65775)

## What

Switches the `training_ingest_benchmark` image_classification entries
from `byod: gpu` (the py3.10 `ray-ml` image) to `torch-cu128` on Python
3.11 — the image added in #65774.

| Entry | Expanded tests |
|---|---|
| `training_ingest_benchmark-task=image_classification` | 22 |
| `...-heterogenous_fixed_size` | 2 |
| `...-heterogenous_autoscaling` | 2 |
| `training_ingest_benchmark-soak_test` | 1 |

**27 expanded tests.** Also relaxes `validate_byod_type` (`torch-cu128`
was pinned to Python 3.14, now accepts 3.11 or 3.14) and adds a py3.11
image-name assertion.

**Stacked on #65774**, which builds the image this points at and must
merge first. This branch also carries a temporary cherry-pick of #65757
(`google-cloud-cli` in base-extra); without it the release build cannot
rebuild the `base-extra` layer at all. Drop that commit once #65757
lands.

## Why 3.11 rather than 3.14

These are the tests that hit a Ray Data race on Python 3.14:
`SplitCoordinator.stats()` serialises a live `DatasetStats` while the
executor appends to `metadata['Map(map_fn)']`, failing with
`RuntimeError: list changed size during iteration`. Reproduced twice
each on `skip_training.parquet`, `skip_training.jpeg.local_fs` and
`skip_training.parquet.fault_tolerance` (release builds 105430 and
105432), against 24 of the group's 27 tests passing on py3.14 and all of
them passing on master's py3.10 nightlies.

The py3.11 ray-torch image carries `torch 2.9.0+cu128` — taken from
`requirements_compiled_py3.11.txt`, the same version the py3.10 `ray-ml`
image runs. So this change moves the Python version and the image while
holding torch fixed, which is what makes the result interpretable.

## Dependency check

Everything these tests need is in
`python/deplocks/ray-torch/ray-torch-cu128_base_py3.11.lock`: `torch`,
`torchvision`, `transformers`, `datasets`, `daft`,
`sentence-transformers`. No `python_depset` or `post_build_script`
required.

Two differences worth knowing, both inherited from Ray's compiled pins
(details in #65774): `torchmetrics` is 0.10.3 rather than 1.9.0, and
`langchain-text-splitters` is absent on 3.11. Neither is imported by
these benchmarks.

`training_ingest_benchmark-task=recsys` deliberately stays on `ray-ml` —
it imports torchrec via `byod_install_torchrec.sh`, which is not in the
ray-torch lock. The other 43 `byod: gpu` entries are untouched.

## Testing

```
$ python -m pytest release/ray_release/tests/test_test.py release/ray_release/tests/test_config.py -q
  54 passed

$ parse_test_definition + validate_test + validate_byod_type over all tests
  validation errors: none
  py3.11  torch-cu128    27 tests
  py3.10  gpu            64 tests   (unchanged, incl. recsys)
```

The release run is the real verification, and it is also the only thing
that builds `ray-torch.py3.11.cu12.8.1-cudnn.base` —
`buildkite/microcheck` contains no ray-torch image jobs. Results will be
posted here.

## Known conflict

#65706 moves the same entries to py3.14 / `torch-cu128`. Whichever lands
second needs a rebase; if this one lands, that PR's ingest portion
becomes redundant.

## AI assistance

AI assistance was used for the swap, the validator change, the
dependency check and the failure triage referenced above. Every changed
line was reviewed and every command shown was run with its output
confirmed.

Release test run: https://github.com/ray-project/ray/pull/65775/changes

---------

Signed-off-by: elliot-barn <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…5774)

## What

Builds the cu12.8 `ray-torch` image for Python 3.11 alongside the
existing 3.14 one.

| File | Change |
|---|---|
| `ci/raydepsets/configs/ray_torch.depsets.yaml` | `py311_cuda128` build
arg set; depset split per Python version |
| `python/deplocks/ray-torch/ray-torch-cu128_base_py3.11.lock` | new |
| `docker/ray-torch/torch-constraints-py3.14.txt` | new — py3.14's pins
(see below) |
| `docker/ray-torch/torch-requirements.txt` | 3.14-only pins moved out;
two py3.11 exclusions |
| `docker/ray-torch/cuda.wanda.yaml` | pass `PYTHON_VERSION` to the
Dockerfile |
| `.buildkite/release/build.rayci.yml` | `"3.11"` added to the two build
steps and the publish step |
| `...ray-torch-cu128_base_py3.14.lock` | provenance comments only, no
version moves |

No release test is changed here; that is ray-project#65775.

## Where the versions come from

**py3.11 is constrained by Ray's own compiled requirements**, through
the same `remove-compiled-headers.sh` pre-hook the CI depsets use:

```yaml
constraints:
  - /tmp/ray-deps/requirements_compiled_py${PYTHON_VERSION}.txt
pre_hooks:
  - ci/raydepsets/pre_hooks/remove-compiled-headers.sh ${PYTHON_VERSION}
```

So the image follows what Ray declares — `torch 2.9.0+cu128`, `numba
0.61.2`, `llvmlite 0.44.0`, `cupy-cuda12x 13.6.0`, `pytest 7.4.4`. That
is also the torch the py3.10 `ray-ml` image runs, so a py3.10-ray-ml vs
py3.11-ray-torch comparison isolates the Python version rather than
mixing in a torch change.

**py3.14 cannot use the same source.**
`requirements_compiled_py3.14.txt` pins `torch==2.7.0`, which publishes
no cp314 wheels:

```
Because only the following versions of torch are available: torch<=2.7.0, torch>=2.7.0+cu128
and torch>=2.7.0,<=2.7.0+cu128 has no wheels with a matching Python ABI tag (e.g. cp314) ...
your requirements are unsatisfiable.
hint: we only found wheels for torch (v2.7.0+cu128) with ABI tags: cp39, cp310, cp311, cp312, cp313, cp313t
```

It keeps a small constraints file holding the versions it already
resolves to, so its lock does not move. The `# necessary changes for
3.14` pins move there as well, because `torch-requirements.txt` is
shared with py3.11 and those exact pins (`numba 0.65.0`, `llvmlite
0.47.0`, `cupy-cuda12x 14.0.1`, `dm-tree 0.1.10`) conflict with the
py3.11 compiled set.

Hence the two depset definitions, with a `TODO` at the top of the config
to unify them once both images can share one constraints source.

## Cost of following the compiled pins on py3.11

Both are marked inline in `torch-requirements.txt`:

- **`locust` resolves to 2.39.1**, not 2.44.3 — 2.44.3 requires
`pytest>=8.3.3` and the py3.11 compiled set pins `pytest==7.4.4`.
(py3.14 pins `pytest==8.3.3`, so it keeps 2.44.3.)
- **`langchain-text-splitters` is excluded on 3.11** — every release
needs a `langchain-core` requiring `jsonpatch>=1.33`, while compiled
pins `jsonpatch==1.32`. No version combination satisfies both.
- Worth noting: `torchmetrics` is `0.10.3` on py3.11 (the compiled pin)
versus `1.9.0` on py3.14.

## The wanda build arg

`docker/ray-torch/Dockerfile` derives the lock path from its own ARG:

```dockerfile
ARG PYTHON_VERSION=3.14
ARG PYTHON_DEPSET=python/deplocks/ray-torch/${IMAGE_TYPE}_base_py${PYTHON_VERSION}.lock
COPY "$PYTHON_DEPSET" /home/ray/python_depset.lock
```

`cuda.wanda.yaml` was passing only `FULL_BASE_IMAGE` and `IMAGE_TYPE`,
so on a 3.11 build the ARG kept its 3.14 default while `srcs` placed
only the 3.11 lock in the context. Latent until now, because with 3.14
the only version built the default happened to match. Reproduced with
the same ARG/COPY logic over a context holding just the 3.11 lock:

```
# before: PYTHON_VERSION not passed
ERROR: failed to compute cache key: "/python/deplocks/ray-torch/ray-torch-cu128_base_py3.14.lock": not found

# after: --build-arg PYTHON_VERSION=3.11
sha256:a61568edcd9a8c7da71da655da6ae0274f55430cf6d34e3a419ec67cda04b4a9
```

The pass-through matches `docker/base-deps/`, `docker/base-slim/`,
`docker/base-extra-testdeps/` and
`ci/docker/ray-torch-anyscale-cuda.wanda.yaml`, which all already list a
bare `PYTHON_VERSION`.

## Everything else 3.11 needs already exists

| Dependency | Coverage |
|---|---|
| `raycudabaseextra` (`ray-py3.11-cu12.8.1-cudnn-base-extra`) | python
3.10–3.14 × cuda incl. `12.8.1-cudnn` |
| `ray-wheel-build` | 3.10–3.14 |
| `push_release_test_image` | takes `--python-version`; nothing
hardcoded |

## Testing

```
$ bazelisk run //ci/raydepsets:raydepsets -- build ci/raydepsets/configs/ray_torch.depsets.yaml
  ray_torch_cu128_base_depset_311 compiled successfully
  ray_torch_cu128_base_depset_314 compiled successfully

$ bazelisk run //ci/raydepsets:raydepsets -- build ci/raydepsets/configs/ray_torch.depsets.yaml --check
  Lock files are up to date.
```

Resulting py3.11 lock: `torch 2.9.0+cu128`, `torchvision 0.24.0+cu128`,
15 `nvidia-*-cu12` packages at 12.8.x, **0 CUDA 13 packages**, 304
packages total. The CUDA check matters because `torch` is unpinned in
`torch-requirements.txt` and the compile sees both PyPI and
`download.pytorch.org/whl/cu128` under `--index-strategy
unsafe-best-match`; without a pin the resolve can land a CUDA 13 stack
inside an image based on `cu12.8.1-cudnn`.

The py3.14 lock diff is `# via -c ...` provenance lines only — no
version changes — so the image that lock backs is unchanged.

Note that `buildkite/microcheck` does not build release images, so the
real verification is the release pipeline building
`ray-torch.py3.11.cu12.8.1-cudnn.base` and `ray-torch-anyscale py3.11`;
that run is on ray-project#65775.

## Not a duplicate

`gh pr list --state open --search "ray-torch python 3.11"` and `--search
"ray_torch depsets"` both return nothing.

## AI assistance

AI assistance was used: adding the build arg set, generating the lock,
diagnosing the CUDA 13 resolution and the wanda build-arg failure, and
confirming which constraint sources are usable per Python version. Every
changed line was reviewed and every command and output quoted above was
run and confirmed.

Signed-off-by: elliot-barn <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…ay-project#65775)

## What

Switches the `training_ingest_benchmark` image_classification entries
from `byod: gpu` (the py3.10 `ray-ml` image) to `torch-cu128` on Python
3.11 — the image added in ray-project#65774.

| Entry | Expanded tests |
|---|---|
| `training_ingest_benchmark-task=image_classification` | 22 |
| `...-heterogenous_fixed_size` | 2 |
| `...-heterogenous_autoscaling` | 2 |
| `training_ingest_benchmark-soak_test` | 1 |

**27 expanded tests.** Also relaxes `validate_byod_type` (`torch-cu128`
was pinned to Python 3.14, now accepts 3.11 or 3.14) and adds a py3.11
image-name assertion.

**Stacked on ray-project#65774**, which builds the image this points at and must
merge first. This branch also carries a temporary cherry-pick of ray-project#65757
(`google-cloud-cli` in base-extra); without it the release build cannot
rebuild the `base-extra` layer at all. Drop that commit once ray-project#65757
lands.

## Why 3.11 rather than 3.14

These are the tests that hit a Ray Data race on Python 3.14:
`SplitCoordinator.stats()` serialises a live `DatasetStats` while the
executor appends to `metadata['Map(map_fn)']`, failing with
`RuntimeError: list changed size during iteration`. Reproduced twice
each on `skip_training.parquet`, `skip_training.jpeg.local_fs` and
`skip_training.parquet.fault_tolerance` (release builds 105430 and
105432), against 24 of the group's 27 tests passing on py3.14 and all of
them passing on master's py3.10 nightlies.

The py3.11 ray-torch image carries `torch 2.9.0+cu128` — taken from
`requirements_compiled_py3.11.txt`, the same version the py3.10 `ray-ml`
image runs. So this change moves the Python version and the image while
holding torch fixed, which is what makes the result interpretable.

## Dependency check

Everything these tests need is in
`python/deplocks/ray-torch/ray-torch-cu128_base_py3.11.lock`: `torch`,
`torchvision`, `transformers`, `datasets`, `daft`,
`sentence-transformers`. No `python_depset` or `post_build_script`
required.

Two differences worth knowing, both inherited from Ray's compiled pins
(details in ray-project#65774): `torchmetrics` is 0.10.3 rather than 1.9.0, and
`langchain-text-splitters` is absent on 3.11. Neither is imported by
these benchmarks.

`training_ingest_benchmark-task=recsys` deliberately stays on `ray-ml` —
it imports torchrec via `byod_install_torchrec.sh`, which is not in the
ray-torch lock. The other 43 `byod: gpu` entries are untouched.

## Testing

```
$ python -m pytest release/ray_release/tests/test_test.py release/ray_release/tests/test_config.py -q
  54 passed

$ parse_test_definition + validate_test + validate_byod_type over all tests
  validation errors: none
  py3.11  torch-cu128    27 tests
  py3.10  gpu            64 tests   (unchanged, incl. recsys)
```

The release run is the real verification, and it is also the only thing
that builds `ray-torch.py3.11.cu12.8.1-cudnn.base` —
`buildkite/microcheck` contains no ray-torch image jobs. Results will be
posted here.

## Known conflict

ray-project#65706 moves the same entries to py3.14 / `torch-cu128`. Whichever lands
second needs a rebase; if this one lands, that PR's ingest portion
becomes redundant.

## AI assistance

AI assistance was used for the swap, the validator change, the
dependency check and the failure triage referenced above. Every changed
line was reviewed and every command shown was run with its output
confirmed.

Release test run: https://github.com/ray-project/ray/pull/65775/changes

---------

Signed-off-by: elliot-barn <[email protected]>
sai-miduthuri added a commit that referenced this pull request Nov 10, 2026
…67789) (#68027)

## Description

Cherry-pick of #67789 (master commit
2f5e30a) onto `releases/2.59.2`.

**Bottom of a 3-PR stack on `releases/2.59.2`:** this PR, then #68035
(the brotli bump for the `large_image_embedding` release lock), then
#68028 (the #67596 pick). Merge the stack with `gh stack merge 68028`,
which lands all three in order.

Brotli 1.0.3 through 1.2.0 has a critical out-of-bounds write in its
decoder, CVE-2026-111497
([GHSA-9v8h-qqgm-4m35](GHSA-9v8h-qqgm-4m35)),
fixed in 1.2.1. Ray gets `brotli` transitively through gradio, and it's
pinned in the compiled requirements and in the image, CI and release
locks.

#67789 does the following:
- Adds `brotli>=1.2.1` to `security-requirements.txt`.
- Moves `brotli` to 1.2.1 in `requirements_compiled.txt` and
`requirements_compiled_py3.14.txt`.
- Moves the locks to 1.2.1.

The #67596 pick, #68028, fixes the conda copy in the base images. It's
stacked above this PR because images built on those bases install these
locks, and with the old pins pip would downgrade brotli to 1.2.0.

## Related issues

Related to #67789. Advisory: GHSA-9v8h-qqgm-4m35 / CVE-2026-111497. The
same pick for 2.60.1 is #67998.

## Additional information

### Cherry-pick details

Applied with `git cherry-pick -x`. Of #67789's 41 files:

- **29 applied.** Their added and removed lines are identical to
master's.
- **12 dropped.** These locks don't exist on this branch, because master
added them after the 2.59 cut:
- `ray-torch-cu128_base_py3.11.lock` (#65774),
`ray-torch-cu133_base_py3.11.lock` and
`ray-torch-cu133_base_py3.14.lock`;
  - the nine `release/ray_release/byod/torch_cu128_*_py3.11.lock` files.
- **`ray-torch-cu128_base_py3.14.lock` conflicted**, because it differs
from master in other packages. I took this branch's version and replaced
brotli's version and hash lines with #67789's 1.2.1 entry, keeping the
branch's `# via` line. Its added and removed lines are now identical to
master's.
- Git's rename detection paired master's
`ray-torch-cu128_base_py3.11.lock` with this branch's
`windows-tests-torch27-ci_depset_py3.10.lock`. That file has no brotli
pin, so it's unchanged.

After the pick, every brotli pin in the compiled requirements and image
and CI locks is 1.2.1, with two exceptions, both still at 1.1.0:

- `release/ray_release/byod/requirements_ml_byod_3.10.txt`. Nothing
references it, and it's the same on master.
- `release/ray_release/byod/large_image_embedding_py3.10.lock`, for the
nightly `large_image_embedding` release test. Master removed that test
and its lock in #65819, so #67789 doesn't cover it. `raydepsets` leaves
the pin as is, because nothing in that depset's inputs requires a newer
brotli. #68035, the next PR in this stack, bumps it to 1.2.1.

Not a duplicate: this branch doesn't contain #67789, and no PR against
`releases/2.59.2` references it. #67998 picks the same commit onto
`releases/2.60.1`.

### Testing

| Command | Result |
|---|---|
| `pre-commit run --files <the 29 changed files>` | Passed |
| `bazel run //ci/raydepsets:raydepsets -- build --all-configs` |
Succeeded with no changes to the tree |

AI assistance was used to prepare this cherry-pick.

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

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants