Repository navigation
Studio: keep an Apple Silicon install's torch through studio update - #18659
Merged
Merged
Conversation
… core package resolve The core unsloth / unsloth-zoo update re-resolves with deps, and the UV_OVERRIDE freeze that keeps the resident torch trio was scoped to Linux and Windows x64 with torch >= 2.13. Apple Silicon now gets torch 2.13 only on a new install or a manual repair (UNSLOTH_TORCH_UPGRADE=1 through install.sh), so the update freezes every resident release there, the same way install.sh freezes the trio for every with-deps unsloth install. Linux, Windows and Intel macOS resolve exactly as before.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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
unsloth studio updatere-resolvesunslothandunsloth-zoowith dependencies. On Linux and Windows x64,_FreezeNewTorchForCoreUpdatepins the resident torch, torchvision and torchaudio throughUV_OVERRIDEwhile that happens, but only for torch >= 2.13. macOS had no freeze.Apple Silicon is moving to torch 2.13 for new installs only (#18428). Existing installs keep their torch unless the user runs a manual repair, which sets
UNSLOTH_TORCH_UPGRADE=1through install.sh. Without a freeze, a released unsloth with a torch ceiling (2026.9.11 declaredtorch<2.13.0) could move a 2.13 Mac install back to 2.12 onstudio update. A torch floor could also move a 2.11 install up.Change
studio/install_python_stack.py: on Apple Silicon (darwin+arm64),_FreezeNewTorchForCoreUpdatenow freezes every resident plainX.Y.Ztorch release, not only >= 2.13. install.sh already freezes the trio this way for every with-deps unsloth install, on every OS. The bundledoverrides-darwin-arm64.txtis folded into the frozen file, minus any torch lines, so the MLX transformers / anyio / huggingface_hub overrides still apply.UV_OVERRIDEand would honour the released cap. This is the same behaviour Linux already has under the freeze.Tests
New file:
studio/backend/tests/test_macos_core_update_torch_freeze.py, CPU only.UV_OVERRIDEis restored afterwards.UV_OVERRIDEis restored to unset.Base (main) vs head: 6 tests fail on main and pass on the branch. The 6 host-unchanged cases pass on both. No head test fails.
Across all 75 test files that import
install_python_stack(8.5k tests), the head's failing test IDs are a subset of main's. The failures are pre-existing and come from this host's environment. They are identical apart from one ROCm spoof test that failed only on the main arm.Not covered