Skip to content

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

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

[release] Bump torch version to 2.7.0+cu128 and torchvision#61328
aslonnie merged 9 commits intoray-project:masterfrom
liulehui:fix-mnist

Conversation

@liulehui
Copy link
Copy Markdown
Contributor

@liulehui liulehui commented Feb 25, 2026

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
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

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.

Comment thread python/requirements/ml/dl-cpu-requirements.txt
Comment thread python/requirements/ml/dl-gpu-requirements.txt
Comment thread python/requirements/ml/dl-gpu-requirements.txt
Comment thread python/requirements/ml/dl-cpu-requirements.txt Outdated
Comment thread release/ray_release/byod/requirements_ml_byod_3.10.txt Outdated
Comment thread python/requirements/ml/dl-cpu-requirements.txt
@liulehui liulehui requested review from a team as code owners February 26, 2026 05:21
Copy link
Copy Markdown

@cursor cursor bot left a comment

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.

Comment thread python/ray/data/_internal/datasource/webdataset_datasource.py
@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
Collaborator

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
Collaborator

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!

Signed-off-by: Lehui Liu <lehui@anyscale.com>
Signed-off-by: Lehui Liu <lehui@anyscale.com>
Signed-off-by: Lehui Liu <lehui@anyscale.com>
Signed-off-by: Lehui Liu <lehui@anyscale.com>
Signed-off-by: Lehui Liu <lehui@anyscale.com>
Signed-off-by: Lehui Liu <lehui@anyscale.com>
Signed-off-by: Lehui Liu <lehui@anyscale.com>
Signed-off-by: Lehui Liu <lehui@anyscale.com>
Signed-off-by: Lehui Liu <lehui@anyscale.com>
@aslonnie aslonnie merged commit 9471670 into ray-project:master Mar 18, 2026
6 checks passed
pedrojeronim0 pushed a commit to pedrojeronim0/ray that referenced this pull request Mar 23, 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 <lehui@anyscale.com>
Signed-off-by: Pedro Jeronimo <pedro.jeronimo@tecnico.ulisboa.pt>
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 <lehui@anyscale.com>
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