Upgrade torchax so PyTorch 2.13 can import in CI - #77
Merged
Conversation
PyTorch 2.13 removed named-tensor Dimname overloads such as aten.prod.dim_Dimname. Unpinned torch>=2.12.0 plus unpinned torchvision now resolve to torch 2.13.0 / torchvision 0.28.0, which crash torchax 0.0.13 at import time and fail test-pytorch collection. Cap both packages at the last compatible pair until a stable torchax release ships google/torchax#102. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
torchax 0.0.13 still indexes aten.prod.dim_Dimname at import time, which PyTorch 2.13 removed. Pin torchax to the 0.0.14.dev nightly that includes google/torchax#102 instead of capping torch<2.13. Verified locally with torch 2.13.0 / torchvision 0.28.0 / torchax 0.0.14.dev20260814: import succeeds and all 15 pytorch tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test-pytorchjobs fail at collection, not during conversion:That is the only failure. Collection never reaches the 15 pytorch tests.
Root cause: PyTorch 2.13 removed named-tensor Dimname overloads. Unpinned
torch>=2.12.0+ unpinnedtorchvisionresolve to torch 2.13.0 / torchvision 0.28.0. Stable torchax 0.0.13 still indexesaten.prod.dim_Dimnameat import time.Fix: keep current torch/torchvision and pin torchax to the post-fix PyPI nightly
0.0.14.dev20260814(google/torchax#102, merged 2026-08-07). There is still no stable 0.0.14. An exact pre-release pin is required so hatch/pip will install it without--pre.This replaces the earlier torch<2.13 cap on this branch.
Test plan
hatch run +py=3.12 test-pytorch:python -c "import torch; import torchax; print(torch.__version__)"→ torch 2.13.0, torchax 0.0.14.dev20260814hatch run +py=3.12 test-pytorch:pytest tests/pytorch/test_pytorch.py→ 15 passedhatch run lint:checktest-pytorchjobs on this PR