fix: use --torch-backend instead of --extra-index-url for dep compilation#373
Merged
fix: use --torch-backend instead of --extra-index-url for dep compilation#373
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #373 +/- ##
==========================================
+ Coverage 54.51% 54.59% +0.08%
==========================================
Files 32 32
Lines 3603 3610 +7
==========================================
+ Hits 1964 1971 +7
Misses 1639 1639
🚀 New features to boost your workflow:
|
…compilation The old --extra-index-url approach caused uv to resolve any package from the PyTorch wheel index when available there, not just torch-ecosystem packages. Replace it with --torch-backend which routes only torch/ torchaudio/torchvision/torchsde to the PyTorch index. Pin uv>=0.6.9 as the minimum version supporting --torch-backend. Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
109bc26 to
e0e50ef
Compare
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.
The old --extra-index-url approach caused uv to resolve any package from the PyTorch wheel index when it happened to be available there, not just torch-ecosystem packages. This is the root cause of #189.
This replaces --extra-index-url in the compile step with uv's --torch-backend flag, which routes only torch, torchaudio, torchvision, and torchsde to the PyTorch index. Everything else resolves from PyPI as expected.
The --extra-index-url is still used at install time (install_deps, fetch_dep_wheels, etc.) where pinned versions from the compiled file prevent any confusion.
Also pins uv>=0.6.0 in pyproject.toml since that's the minimum version supporting --torch-backend.