Skip to content

[release] Bump torch version to 2.7.0+cu128 and torchvision - #61328

Merged
aslonnie merged 9 commits into
ray-project:masterfrom
liulehui:fix-mnist
Mar 18, 2026
Merged

aslonnie merged 9 commits into
ray-project:masterfrom
liulehui:fix-mnist

Conversation

@liulehui

@liulehui liulehui commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

  1. upgrading torch/torchvision to torch==2.7.0+cu128 and torchvision==0.22.0
  2. skip one torchtext test as torchtext is discontinued
  3. change the weight_only=False default for torch.load since
[2026-02-26T00:46:49Z] 	(1) In PyTorch 2.6, we changed the default value of the `weights_only` argument in `torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
[2026-02-26T00:46:49Z] 	(2) Alternatively, to load with `weights_only=True` please check the recommended steps in the following error message.
  1. update the base gpu ubuntu version to 22.04 to make it compatible with glibc

Additional information

test with premerge

@liulehui liulehui added the go add ONLY when ready to merge, run all tests label Feb 25, 2026

@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 bumps the versions of torch to 2.7.0 and torchvision to 0.22.0, and updates the CUDA version to 12.8. While the version bumps are applied consistently across the requirements files, there are several critical issues with the URLs for package indices.

The public URLs for PyTorch wheels (https://download.pytorch.org/whl/cu128) and PyG wheels (https://data.pyg.org/whl/torch-2.7.0+...) are currently invalid and return 404 errors. This will cause the build to fail. If these packages are hosted on an internal mirror, the URLs in the requirements files should be updated to point to it. Otherwise, please ensure the public URLs are correct and the packages are available before this PR is merged.

Additionally, the requirements_compiled.txt and requirements_compiled_py3.13.txt files have been partially updated. The torch and torchvision versions are bumped, but the --find-links URL at the top of these files still points to the old torch-2.3.0 index. These should be updated to torch-2.7.0 to be consistent with the other changes.

@liulehui
liulehui requested review from a team as code owners February 26, 2026 05:21

@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 and found 1 potential issue.

@liulehui
liulehui requested review from a team as code owners February 26, 2026 17:54
@ray-gardener ray-gardener Bot added rllib RLlib related issues train Ray Train Related Issue labels Feb 27, 2026
@@ -1,5 +1,5 @@
name: "oss-ci-base_cu128-py$PYTHON"
froms: ["nvidia/cuda:12.8.1-cudnn-devel-ubuntu20.04"]
froms: ["nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04"]

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.

wait.. this might be a bit too much.. we do want to upgrade ubuntu, but if this is upgraded, the other CI images also need to be upgraded for consistency. which I am not sure if we are ready yet. @andrew-anyscale how is the status of using everything with manylinux built bits today?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see, I only checked the forge one, which is 22.04, but seems other base image using ubuntun:focal which is 20.04 iiuc.

is there other recommendation that can be used to make the glibc happy with the upgrade? I think this premerge does block a few PR from landing.
Thank you!

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.

we are working on upgrading to 22.04.. I will let @andrew-anyscale have a look on where we are now and make a call.

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.

Apologies I missed this convo-- Let me refresh my current state on the CI upgrade, and get back by EOD. I believe upgrading the other CI images should not be an extreme lift

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.

Appreciate folks patience on this. Iterating on the CI upgrade on #61533 , and I'll update this thread with progress as it is available

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.

CI upgrade has landed #61533

You should be good to rebase off latest master to pull these changes 🙏

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks and rebased!

@aslonnie
aslonnie merged commit 9471670 into ray-project:master Mar 18, 2026
3 checks passed
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Mar 25, 2026
…ect#61328)

1. upgrading torch/torchvision to `torch==2.7.0+cu128` and
`torchvision==0.22.0`
2. skip one torchtext test as torchtext is discontinued
3. change the weight_only=False default for torch.load since
```
[2026-02-26T00:46:49Z] 	(1) In PyTorch 2.6, we changed the default value of the `weights_only` argument in `torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
[2026-02-26T00:46:49Z] 	(2) Alternatively, to load with `weights_only=True` please check the recommended steps in the following error message.
```
4. update the base gpu ubuntu version to 22.04 to make it compatible
with glibc

Signed-off-by: Lehui Liu <[email protected]>
Lucas61000 pushed a commit to Lucas61000/ray that referenced this pull request May 15, 2026
…ect#61328)

1. upgrading torch/torchvision to `torch==2.7.0+cu128` and
`torchvision==0.22.0`
2. skip one torchtext test as torchtext is discontinued
3. change the weight_only=False default for torch.load since
```
[2026-02-26T00:46:49Z] 	(1) In PyTorch 2.6, we changed the default value of the `weights_only` argument in `torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
[2026-02-26T00:46:49Z] 	(2) Alternatively, to load with `weights_only=True` please check the recommended steps in the following error message.
```
4. update the base gpu ubuntu version to 22.04 to make it compatible
with glibc

Signed-off-by: Lehui Liu <[email protected]>
matthewdeng pushed a commit that referenced this pull request Jun 8, 2026
## Summary

The `air_example_gptj_deepspeed_fine_tuning` release test fails due to
dependency incompatibilities introduced when the base ray-ml image was
upgraded to torch 2.7.0+cu128 (triton 3.3.0) in
#61328.

This PR fixes the dependency issues so the test passes.

Failing build: https://buildkite.com/ray-project/release/builds/87834#_

## Changes

- Update notebook dependency pins: `deepspeed` 0.12.3 -> 0.17.2,
`accelerate` 0.18.0 -> 0.33.0, `transformers` 4.26.0 -> 4.36.2
- Remove `reduce_bucket_size`, `stage3_prefetch_bucket_size`,
`stage3_param_persistence_threshold` from DeepSpeed config (HF Trainer
resolved these "auto" values to floats, which DeepSpeed 0.17.2's
pydantic validation rejects)
- Install `accelerate==0.33.0` and uninstall `peft` in BYOD script (base
image's `peft==0.11.1` is incompatible with `transformers==4.36.2`, and
the notebook's pip install cell is commented out by jupytext during
conversion)
- Remove `torch>=1.12.0` from runtime_env and stale TODO comment

Signed-off-by: JasonLi1909 <[email protected]>
Signed-off-by: JasonLi1909 <[email protected]>
Co-authored-by: Mark Towers <[email protected]>
sampan-s-nayak pushed a commit to sampan-s-nayak/ray that referenced this pull request Jun 10, 2026
…ject#62486)

## Summary

The `air_example_gptj_deepspeed_fine_tuning` release test fails due to
dependency incompatibilities introduced when the base ray-ml image was
upgraded to torch 2.7.0+cu128 (triton 3.3.0) in
ray-project#61328.

This PR fixes the dependency issues so the test passes.

Failing build: https://buildkite.com/ray-project/release/builds/87834#_

## Changes

- Update notebook dependency pins: `deepspeed` 0.12.3 -> 0.17.2,
`accelerate` 0.18.0 -> 0.33.0, `transformers` 4.26.0 -> 4.36.2
- Remove `reduce_bucket_size`, `stage3_prefetch_bucket_size`,
`stage3_param_persistence_threshold` from DeepSpeed config (HF Trainer
resolved these "auto" values to floats, which DeepSpeed 0.17.2's
pydantic validation rejects)
- Install `accelerate==0.33.0` and uninstall `peft` in BYOD script (base
image's `peft==0.11.1` is incompatible with `transformers==4.36.2`, and
the notebook's pip install cell is commented out by jupytext during
conversion)
- Remove `torch>=1.12.0` from runtime_env and stale TODO comment

Signed-off-by: JasonLi1909 <[email protected]>
Signed-off-by: JasonLi1909 <[email protected]>
Co-authored-by: Mark Towers <[email protected]>
limarkdcunha pushed a commit to limarkdcunha/ray that referenced this pull request Jun 30, 2026
…ject#62486)

## Summary

The `air_example_gptj_deepspeed_fine_tuning` release test fails due to
dependency incompatibilities introduced when the base ray-ml image was
upgraded to torch 2.7.0+cu128 (triton 3.3.0) in
ray-project#61328.

This PR fixes the dependency issues so the test passes.

Failing build: https://buildkite.com/ray-project/release/builds/87834#_

## Changes

- Update notebook dependency pins: `deepspeed` 0.12.3 -> 0.17.2,
`accelerate` 0.18.0 -> 0.33.0, `transformers` 4.26.0 -> 4.36.2
- Remove `reduce_bucket_size`, `stage3_prefetch_bucket_size`,
`stage3_param_persistence_threshold` from DeepSpeed config (HF Trainer
resolved these "auto" values to floats, which DeepSpeed 0.17.2's
pydantic validation rejects)
- Install `accelerate==0.33.0` and uninstall `peft` in BYOD script (base
image's `peft==0.11.1` is incompatible with `transformers==4.36.2`, and
the notebook's pip install cell is commented out by jupytext during
conversion)
- Remove `torch>=1.12.0` from runtime_env and stale TODO comment

Signed-off-by: JasonLi1909 <[email protected]>
Signed-off-by: JasonLi1909 <[email protected]>
Co-authored-by: Mark Towers <[email protected]>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…ject#62486)

## Summary

The `air_example_gptj_deepspeed_fine_tuning` release test fails due to
dependency incompatibilities introduced when the base ray-ml image was
upgraded to torch 2.7.0+cu128 (triton 3.3.0) in
ray-project#61328.

This PR fixes the dependency issues so the test passes.

Failing build: https://buildkite.com/ray-project/release/builds/87834#_

## Changes

- Update notebook dependency pins: `deepspeed` 0.12.3 -> 0.17.2,
`accelerate` 0.18.0 -> 0.33.0, `transformers` 4.26.0 -> 4.36.2
- Remove `reduce_bucket_size`, `stage3_prefetch_bucket_size`,
`stage3_param_persistence_threshold` from DeepSpeed config (HF Trainer
resolved these "auto" values to floats, which DeepSpeed 0.17.2's
pydantic validation rejects)
- Install `accelerate==0.33.0` and uninstall `peft` in BYOD script (base
image's `peft==0.11.1` is incompatible with `transformers==4.36.2`, and
the notebook's pip install cell is commented out by jupytext during
conversion)
- Remove `torch>=1.12.0` from runtime_env and stale TODO comment

Signed-off-by: JasonLi1909 <[email protected]>
Signed-off-by: JasonLi1909 <[email protected]>
Co-authored-by: Mark Towers <[email protected]>
Signed-off-by: 400Ping <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests rllib RLlib related issues train Ray Train Related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants