Skip to content

Update docs to fix torchvision version specifiers for CPU wheels#17380

Closed
appleparan wants to merge 1 commit intoastral-sh:mainfrom
appleparan:appleparan/fix-pytorch-docs
Closed

Update docs to fix torchvision version specifiers for CPU wheels#17380
appleparan wants to merge 1 commit intoastral-sh:mainfrom
appleparan:appleparan/fix-pytorch-docs

Conversation

@appleparan
Copy link

@appleparan appleparan commented Jan 9, 2026

Summary

The CPU index provides wheels with different local version suffixes: +cpu for x86_64 (Linux) and AMD64 (Windows), but no suffix for aarch64 (Linux) and arm64 (macOS). Add platform-specific version specifiers to match the available wheels.

This PR doesn't fix a uv bug, but it addresses and can close the issues raised here. #16386 #17314

@zanieb zanieb requested a review from charliermarsh January 9, 2026 15:55
The CPU index provides wheels with different local version suffixes:
`+cpu` for x86_64 (Linux) and AMD64 (Windows), but no suffix for
aarch64 (Linux) and arm64 (macOS). Add platform-specific version
specifiers to match the available wheels.

Add environments constraint to avoid resolution conflicts between
dependencies and sources markers.
@appleparan appleparan force-pushed the appleparan/fix-pytorch-docs branch from 7312133 to f80e84e Compare January 10, 2026 02:54
@appleparan
Copy link
Author

I've added environments constraint to avoid resolution conflicts between
dependencies, sources, and markers.

Without the environments constraint, uv generates all possible combinations of sources and markers. This causes local versions like torchvision==0.24.1+cpu to appear across all source indices, and produces logically impossible marker expressions such as:

(extra == 'cpu' and extra == 'cu126')

appleparan referenced this pull request in appleparan/copier-modern-ml Jan 11, 2026
…nflicts

Add explicit environments constraint to prevent uv from having resolution
conflicts between dependencies and sources markers. This ensures proper
resolution for all supported platform/architecture combinations:

- Linux x86_64
- Linux aarch64
- macOS arm64
- Windows AMD64

Also clean up trailing whitespace in dependency-groups.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Comment on lines +247 to +252
!!! note

The CPU index provides wheels with different local version suffixes depending on the platform:
`+cpu` for x86_64 (Linux) and AMD64 (Windows), but no suffix for aarch64 (Linux) and arm64 (macOS).
As such, `torchvision` requires platform-specific version specifiers to match the available wheels.

Copy link
Member

Choose a reason for hiding this comment

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

CC @atalman just to confirm that this is intentional

Copy link
Member

@konstin konstin Jan 12, 2026

Choose a reason for hiding this comment

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

For context, that is the list of wheels for torch 2.9.1 on Python 3.14:

torch-2.9.1+cpu-cp314-cp314-manylinux_2_28_aarch64.whl
torch-2.9.1+cpu-cp314-cp314-manylinux_2_28_x86_64.whl
torch-2.9.1+cpu-cp314-cp314-win_amd64.whl
torch-2.9.1+cpu-cp314-cp314t-manylinux_2_28_aarch64.whl
torch-2.9.1+cpu-cp314-cp314t-manylinux_2_28_x86_64.whl
torch-2.9.1+cpu-cp314-cp314t-win_amd64.whl
torch-2.9.1+cu126-cp314-cp314-manylinux_2_28_aarch64.whl
torch-2.9.1+cu126-cp314-cp314-manylinux_2_28_x86_64.whl
torch-2.9.1+cu126-cp314-cp314-win_amd64.whl
torch-2.9.1+cu126-cp314-cp314t-manylinux_2_28_aarch64.whl
torch-2.9.1+cu126-cp314-cp314t-manylinux_2_28_x86_64.whl
torch-2.9.1+cu126-cp314-cp314t-win_amd64.whl
torch-2.9.1+cu128-cp314-cp314-manylinux_2_28_aarch64.whl
torch-2.9.1+cu128-cp314-cp314-manylinux_2_28_x86_64.whl
torch-2.9.1+cu128-cp314-cp314-win_amd64.whl
torch-2.9.1+cu128-cp314-cp314t-manylinux_2_28_aarch64.whl
torch-2.9.1+cu128-cp314-cp314t-manylinux_2_28_x86_64.whl
torch-2.9.1+cu128-cp314-cp314t-win_amd64.whl
torch-2.9.1+cu129-cp314-cp314-manylinux_2_28_aarch64.whl
torch-2.9.1+cu129-cp314-cp314-manylinux_2_28_x86_64.whl
torch-2.9.1+cu129-cp314-cp314t-manylinux_2_28_aarch64.whl
torch-2.9.1+cu129-cp314-cp314t-manylinux_2_28_x86_64.whl
torch-2.9.1+cu130-cp314-cp314-manylinux_2_28_aarch64.whl
torch-2.9.1+cu130-cp314-cp314-manylinux_2_28_x86_64.whl
torch-2.9.1+cu130-cp314-cp314-win_amd64.whl
torch-2.9.1+cu130-cp314-cp314t-manylinux_2_28_aarch64.whl
torch-2.9.1+cu130-cp314-cp314t-manylinux_2_28_x86_64.whl
torch-2.9.1+cu130-cp314-cp314t-win_amd64.whl
torch-2.9.1+rocm6.3-cp314-cp314-manylinux_2_28_x86_64.whl
torch-2.9.1+rocm6.3-cp314-cp314t-manylinux_2_28_x86_64.whl
torch-2.9.1+rocm6.4-cp314-cp314-manylinux_2_28_x86_64.whl
torch-2.9.1+rocm6.4-cp314-cp314t-manylinux_2_28_x86_64.whl
torch-2.9.1+xpu-cp314-cp314-linux_x86_64.whl
torch-2.9.1+xpu-cp314-cp314-win_amd64.whl
torch-2.9.1+xpu-cp314-cp314t-linux_x86_64.whl
torch-2.9.1+xpu-cp314-cp314t-win_amd64.whl
torch-2.9.1-cp314-cp314-macosx_11_0_arm64.whl
torch-2.9.1-cp314-cp314t-macosx_11_0_arm64.whl

Copy link
Member

Choose a reason for hiding this comment

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

I thought this was fixed in pytorch/test-infra#7589, but perhaps there hasn't been a release since then?

Copy link
Author

@appleparan appleparan Jan 12, 2026

Choose a reason for hiding this comment

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

Agreed. I'm looking for build log for that.

Note: This should be closed also if this PR is closed

Copy link
Author

@appleparan appleparan Jan 12, 2026

Choose a reason for hiding this comment

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

@atalman said in here,

This is the same issue as: pytorch/vision#9249 and its fix for the release 0.25.0 of torchvision.

It's a temporary issue in 0.24.x, so I should close this PR.

@appleparan appleparan closed this Jan 12, 2026
@appleparan
Copy link
Author

I close this PR due to this comment

This is the same issue as: pytorch/vision#9249 and its fix for the release 0.25.0 of torchvision.

It turns out this is a 0.24.x-specific issue that is fixed in 0.25.0. I will reopen this PR if we need to document this behavior for 0.24.x.

@charliermarsh
Copy link
Member

Thank you @appleparan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants