Repository navigation
[release] Move GPU train release tests to Python 3.14 on the ray-torch image - #65706
elliot-barn wants to merge 9 commits into
Conversation
Flip four GPU training release tests from the Python 3.10 ray-ml BYOD image to the Python 3.14 anyscale/ray-torch image (byod type torch-cu128), which is the ray-ml replacement on Python versions where the ml image is not built. - air_benchmark_torch_mnist_gpu_4x4 - train_async_checkpointing_validation_benchmark - train_preemption_benchmark - train_elastic_e2e_with_node_killing These four only import torch / torchvision / torchmetrics, all of which the ray-torch lock already provides (torch 2.10.0+cu128), so no python_depset or post_build_script is needed. Frequencies are unchanged. Verified with: bazel test //release:test_config Signed-off-by: elliot-barn <[email protected]>
…on 3.14
Adds a shared ML dependency layer for release tests running on the
anyscale/ray-torch image and moves three more Train tests onto it:
- torch_lightning
- huggingface_transformers
- huggingface_accelerate
The ray-torch image only carries the torch stack, not the rest of what
ray-ml shipped, so these three need `lightning`, `accelerate` and
`evaluate` layered on top. New depset
`ci/raydepsets/configs/release_ray_torch_tests.depsets.yaml` expands the
ray-torch base image deps with those three, constrained to the ray-torch
base lock so torch and friends stay pinned to exactly what the image
already installs (torch 2.10.0+cu128, transformers 4.57.6, numpy 2.4.6).
The result is consumed via `byod.python_depset`, which the BYOD build
installs automatically with `uv pip install --system --no-deps`.
torch_lightning drops its `post_build_script`: the lock now supplies
lightning (2.6.5), so byod_pytorch_lightning_test.sh (which pinned the
mid-2024 lightning==2.4.0) is no longer needed.
Recompiling this config leaves the ancestor locks (ray_img_py314,
ray-torch-cu128 base) byte-identical.
Verified with: bazel test //release:test_config
//release:test_custom_byod_build_init_helper
Signed-off-by: elliot-barn <[email protected]>
Moves the remaining image-classification Train benchmarks and the local mode test to the Python 3.14 ray-torch image: - training_ingest_benchmark-task=image_classification - training_ingest_benchmark-task=image_classification-heterogenous_fixed_size - training_ingest_benchmark-task=image_classification-heterogenous_autoscaling - training_ingest_benchmark-soak_test - torch_local_mode These exercise Ray Data and Ray Train together, which is the coverage the earlier batches did not reach. No python_depset is needed. The benchmark suite imports torchrec, but only on the recsys code path (train_benchmark.py imports it inside a `task == "recsys"` branch); the image-classification path needs just torch / torchvision / pyarrow / boto3 / pydantic, all of which the ray-torch base lock already provides. training_ingest_benchmark-task=recsys is deliberately left on Python 3.10 and the ray-ml image: it is `frequency: manual` and installs torchrec via byod_install_torchrec.sh, which has no Python 3.14 equivalent. torch_local_mode is effectively pre-verified -- torch_local_mode_ray_torch is the same script and compute at py3.14 on torch-cu128, and it passed in release build 103115. That variant becomes redundant once this lands and should be removed in the final PR. Verified with: bazel test //release:test_config Signed-off-by: elliot-barn <[email protected]>
The three training_ingest_benchmark entries moved to torch-cu128 in the previous commit still carried "# 'type: gpu' means: use the 'ray-ml' image." directly above `type: torch-cu128`. Update the comment to describe the image the tests now actually use. Signed-off-by: elliot-barn <[email protected]>
Carries the fix from #65757 so this branch's release builds can rebuild the base-extra layer. Google's cloud-sdk apt repo no longer publishes google-cloud-sdk, so any cache-missing rebuild fails with exit code 100. Drop this commit once #65757 lands on master. Signed-off-by: elliot-barn <[email protected]>
Reverts the batch 3 flip for training_ingest_benchmark-task=image_classification
and its -heterogenous_fixed_size / -heterogenous_autoscaling siblings. They hit a
Ray Data race on Python 3.14 that does not occur on the py3.10 ray-ml image.
SplitCoordinator.stats() returns the live executor stats object
(StreamingExecutor.get_stats: "The stats object will be updated as streaming
execution progresses"). Returning it across an actor boundary makes Ray pickle
it, and the pickler walks DatasetStats.metadata['Map(map_fn)'] -- a list of
BlockStats that grows as blocks complete -- while the executor appends to it:
ray::SplitCoordinator.stats()
-> cloudpickle dumps -> super().dump(obj)
RuntimeError: list changed size during iteration
Reproduced twice each (release builds 105430 and 105432) on
skip_training.parquet, skip_training.jpeg.local_fs and
skip_training.parquet.fault_tolerance; the last presented as lost workers in the
first run and as the serialization error in the second, so it is the same bug.
All three pass on master nightlies on py3.10.
The rest of the flip stays: batches 1 and 2, torch_local_mode and the soak test
remain on py3.14 / torch-cu128 (24 distinct tests verified green).
Signed-off-by: elliot-barn <[email protected]>
Completes the previous commit by reverting the whole image_classification group rather than only the variations observed failing. soak_test runs the same workload (train_benchmark.py --task=image_classification --dataloader_type=ray_data), so it is exposed to the same Ray Data stats race; keeping it on py3.14 would leave one member of the group on a different image for no reason other than that its 12h run had not finished yet. torch_local_mode stays on py3.14: it runs torch_local_mode_launcher.py, not the ingest benchmark workload. Signed-off-by: elliot-barn <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request updates several Ray Train release tests to run on Python 3.14 with CUDA 12.8, introduces a new dependency set configuration for these tests, and updates the base Dockerfile to use google-cloud-cli instead of google-cloud-sdk. Feedback on the changes highlights an issue in the dependency set configuration where --index is used instead of --extra-index-url, which would cause compilation errors and prevent PyPI packages from being resolved.
Verification statusAll three batches have now been run in the
Of the Why the ingest benchmarks are going back to Python 3.10Three tests fail on py3.14 and pass on master's py3.10 nightlies (builds 105208 / 105309 / 105362 / 105400) and weekly (105401):
Each failed twice, in both 105430 and 105432. The root cause is the same for all three — it is a Ray Data race, not a py3.14 packaging or ABI problem:
It is timing-dependent, which is why it does not reproduce on py3.10 and why sibling variations on the identical path ( The whole What remains flipped to py3.14 /
|
Keeps the Python 3.10 entries as the ones that actually run, and adds a _ray_torch copy of each on python 3.14 / byod torch-cu128 with frequency: manual, so the py3.14 coverage stays runnable on demand instead of being deleted while the Ray Data stats race is outstanding. Every frequency is forced to manual, including the per-variation overrides: the source entries set weekly/manual on individual variations, so copying them unchanged would have left those variations running automatically. Each copy carries a TODO to restore the original frequencies and drop the py3.10 entry once SplitCoordinator.stats() no longer serializes the live executor DatasetStats while the executor appends to metadata['Map(map_fn)']. Adds 27 manual tests: image_classification (22 variations), -heterogenous_fixed_size (2), -heterogenous_autoscaling (2) and soak_test (1). Signed-off-by: elliot-barn <[email protected]>
This reverts commit 99fdf98. The ingest benchmarks are moving to a smaller Python bump instead of keeping py3.14 copies around. Signed-off-by: elliot-barn <[email protected]>
…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]>
…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]>
Description
Incremental follow-up to #65114, which added the
anyscale/ray-torchrelease-testimage (py3.14, cu12.8) and the
torch-cu128BYOD type but only wired a single test(
torch_local_mode_ray_torch,frequency: manual) onto it.This PR moves existing GPU training release tests from the Python 3.10
ray-mlBYOD image to the Python 3.14
ray-torchimage, in batches, running each batchthrough the release pipeline before adding the next.
ray-mlis not built for Python versions above 3.10, soray-torchis itsreplacement for GPU release testing on newer interpreters. Moving these tests is how
we get real Python 3.14 signal for Ray Train.
Batch 1 — tests that need nothing beyond the image
air_benchmark_torch_mnist_gpu_4x4g4dn.12xlargetrain_async_checkpointing_validation_benchmarkg4dn.xlargex2-4train_preemption_benchmarkg4dn.xlargex8-10train_elastic_e2e_with_node_killingg4dn.12xlargex1-4These four import only
torch/torchvision/torchmetrics, all of whichpython/deplocks/ray-torch/ray-torch-cu128_base_py3.14.lockalready provides(
torch==2.10.0+cu128), so nopython_depsetorpost_build_scriptis needed.Frequencies are unchanged.
Tests deliberately not in batch 1:
torch_lightning,huggingface_transformersand
huggingface_accelerateneedlightning/accelerate/evaluate, andtraining_ingest_benchmarkneedstorchrec- none of which are in the ray-torchlock. Those need a
python_depsetand will come in a later batch.Related issues / duplicate check
Not a duplicate.
gh pr list --repo ray-project/ray --state open --search "torch-cu128"and a search for open PRs moving release tests to Python 3.14 return nothing
overlapping. #63270 was a closed
[DO NOT MERGE]branch used to survey which releasetests pass on 3.14; this PR lands that coverage for real, one reviewable batch at a
time.
Checks
Release-pipeline run for the four batch-1 tests: linked in a comment below once it
completes. This PR stays in draft until that run is green.
AI assistance (Claude Code) was used to prepare this change.