Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3ee264a
Studio: install torch 2.13 on new Linux cu130 Python 3.13 installs, k…
danielhanchen Sep 28, 2026
797a7ae
Studio: only default to torch 2.13 once PyPI unsloth admits it; freez…
danielhanchen Sep 28, 2026
d5e2e36
Tighten the torch 2.13 route comments
danielhanchen Sep 28, 2026
90bc5a0
Keep only cu130-served torch on repair; never let pip or an inherited…
danielhanchen Sep 28, 2026
c28dca2
Size the preservation window from the local route alone; keep relativ…
danielhanchen Sep 28, 2026
e5df690
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 28, 2026
2590d3f
Keep the old torch window when a uv upload-date cutoff is set
danielhanchen Sep 28, 2026
af7409e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 28, 2026
5b3f79b
Repair to the default range when no resident release is keepable, lea…
danielhanchen Sep 28, 2026
04d17a4
Stand the torch 2.13 gate down offline and on any configured package …
danielhanchen Sep 28, 2026
4070fa6
Drop a duplicated torchaudio comment
danielhanchen Sep 28, 2026
3a51f0d
Give torch 2.13 only to a fresh home: record legacy-layout torch, nev…
danielhanchen Sep 28, 2026
2122d63
Merge main into r12150
danielhanchen Sep 29, 2026
cdc1933
Treat a legacy .venv with a broken interpreter as an existing install
danielhanchen Sep 30, 2026
91ddcdf
Merge main into r12150
danielhanchen Oct 1, 2026
38edbb5
Desktop: manual Repair installation moves to the newest supported PyT…
danielhanchen Oct 1, 2026
cc868cb
Merge origin/main into studio-torch-213-cu130
danielhanchen Oct 2, 2026
bf1cd08
install.sh: an upgrade with the 2.13 route closed keeps a resident to…
danielhanchen Oct 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Repair to the default range when no resident release is keepable, lea…
…ving 2.13 to install.sh's gate
  • Loading branch information
danielhanchen committed Sep 28, 2026
commit 5b3f79b90733a5cc3d85506a6966e7100f439788
10 changes: 4 additions & 6 deletions studio/backend/tests/test_cu130_repair_torch_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ def test_a_resident_release_is_kept(monkeypatch, mod, resident, expected):

# 2.4-2.8 are older than anything the cu130 index serves, so pinning them would fail the repair.
@pytest.mark.parametrize("resident", [None, "2.15.0", "2.3.1", "2.6.0", "2.8.0"])
def test_no_keepable_release_repairs_to_213(monkeypatch, mod, resident):
def test_no_keepable_release_repairs_to_the_default_range(monkeypatch, mod, resident):
# 2.13 without a kept release would bypass install.sh's PyPI gate and any uv upload cutoff.
_route(monkeypatch, mod, torch = resident)
assert mod._cuda_repair_torch_specs(CU130, mod._CUDA_TORCH_PKG_SPEC) == (
"torch>=2.13.0,<2.14.0",
"torchvision>=0.28.0,<0.29.0",
"torchaudio>=2.4,<2.12.0",
)
for default in (mod._CUDA_TORCH_PKG_SPEC, mod._TORCH_FLAVOR_REPAIR_PKG_SPEC):
assert mod._cuda_repair_torch_specs(CU130, default) is default


@pytest.mark.parametrize(
Expand Down
13 changes: 5 additions & 8 deletions studio/install_python_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,9 @@ def _torch_index_leaf(url: str) -> str:
"torchaudio>=2.4,<2.12.0",
)

# The install.sh _cu130_torch213_route: a repair keeps a resident 2.9-2.14 release, else installs 2.13.
# The install.sh _cu130_torch213_route: a repair keeps a resident 2.9-2.14 release.
_CU130_PRESERVE_TORCH_CEILING_MINOR = 15
_CU130_FIRST_TORCH_MINOR = 9 # download.pytorch.org/whl/cu130 starts at torch 2.9.0
_CU130_NEW_INSTALL_TORCH_PKG_SPEC: tuple[str, str, str] = (
"torch>=2.13.0,<2.14.0",
"torchvision>=0.28.0,<0.29.0",
"torchaudio>=2.4,<2.12.0",
)


def _is_cu130_torch213_route(index_url: str | None) -> bool:
Expand All @@ -426,7 +421,9 @@ def _resident_torch_release() -> str | None:
def _cuda_repair_torch_specs(
index_url: str | None, default: tuple[str, str, str]
) -> tuple[str, str, str]:
"""Repair specs for index_url: ``default`` everywhere except the cu130 torch 2.13 route."""
"""``default``, except that the cu130 torch 2.13 route keeps a resident release it serves.

Never installs 2.13 itself: whether a release admits it is install.sh's PyPI decision."""
if not _is_cu130_torch213_route(index_url):
return default
release = _resident_torch_release()
Expand All @@ -440,7 +437,7 @@ def _cuda_repair_torch_specs(
f"torchvision==0.{minor + 15}.*",
f"torchaudio==2.{audio_minor}.*",
)
return _CU130_NEW_INSTALL_TORCH_PKG_SPEC
return default


def _resident_torch_trio_pins() -> list[str]:
Expand Down
Loading