Repository navigation
Studio: install the supported MLX stack on fresh macOS installs - #10403
Conversation
install.sh sets SKIP_STUDIO_BASE=1 so the core packages are not reinstalled, but that flag also gated the by-name MLX install. On the fresh path mlx-lm then only arrived transitively, nothing held tokenizers inside its <=0.23.0 window, and Train and Export came up disabled until `unsloth studio update` was run.
Codex Review SummaryThis 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. |
The ungated MLX step also ran under --no-torch on Apple Silicon, where install.sh sets both SKIP_STUDIO_BASE and UNSLOTH_NO_TORCH. These are direct package args so NO_TORCH_SKIP_PACKAGES cannot filter them. Gate on NO_TORCH, matching the MLX health probe below.
|
Good catch on the On Apple Silicon Now gated on Verified on macOS arm64 with real installs into clean
The |
|
Codex Review: Didn't find any major issues. Swish! 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". |
|
Confirmed main still gates the MLX step on not skip_base in studio/install_python_stack.py, so a fresh Apple Silicon install ends up without a usable MLX stack, and the added NO_TORCH gate matches the health check further down. Will get this reviewed. |
Resolve the MLX step conflict: keep the branch's drop of the skip_base gate so fresh installs still get MLX, keep main's NO_TORCH gate and its rationale, and keep the supported pins. Update the progress-budget assertion in test_mlx_install.py: main added one installer step, so the macOS base is 12/13 rather than 11/12.
The pins are not installable everywhere Apple Silicon is, and pip_install
exits on failure, so on those hosts this step ends the whole install.
mlx 0.32.1 / mlx-metal 0.32.1 macosx_14_0_arm64 wheels only, no sdist
the whole pinned set cp310 and up, no cp39 wheel
Read off the index rather than reasoned about:
uv pip install --python-platform aarch64-apple-darwin mlx==0.32.1
-> no wheels with a matching platform tag (e.g. macosx_13_0_arm64)
the same resolve at --python-version 3.9
-> no wheels with a matching Python implementation tag (e.g. cp39)
Before this branch, macOS 13 arm64 reached neither failure: the fresh path
skipped the step, and the update path was unpinned and resolved mlx 0.29.3.
Running it on fresh installs and pinning it turns both into an abort with no
manifest written, i.e. a venv the CLI then reports as half-built.
Nothing is lost by stepping aside, because those hosts cannot have a usable
stack in the first place. mlx_repair's own floors (mlx>=0.22, mlx-lm>=0.31.2,
mlx-vlm>=0.4.4) are unsatisfiable there:
uv pip install --python-platform aarch64-apple-darwin 'mlx-lm>=0.31.2'
-> mlx>=0.30.4 has no wheels with a matching platform tag
The unpinned resolve the update path used was worse than nothing: mlx-lm
0.29.1 and mlx-vlm 0.3.9 are both under those floors, so Studio rejected the
stack anyway, and it dragged transformers to 5.16.1, the version
overrides-darwin-arm64.txt documents as stranding tokenizers and breaking
every `import transformers` on macOS arm64.
Both branches spend a progress slot, so the denominator does not depend on
the host, and the gate the budget is computed from is unchanged.
test_no_torch_skips_mlx_stack.py reads the guard out of the AST and the step
now sits one branch deeper, so it walks the enclosing chain and asserts on the
outermost test, which is still the platform gate it exists to protect.
|
@codex security review |
|
Codex Review: Didn't find any major issues. Nice work! 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". |
Comment lines only, AST-verified: 66 removed for 30 added across the three files. Every load-bearing fact stays, including the wheel provenance the two floor constants are read from.
|
Codex Review: Didn't find any major issues. Can't wait for the next one! 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". |
Fresh Apple Silicon installs could finish with Train and Export disabled because
SKIP_STUDIO_BASE=1also skipped the MLX dependency pass. The resulting tokenizers version prevented MLX imports, leaving Studio in chat-only mode after installation.Run the existing MLX step on fresh training installs and keep its progress count aligned. Preserve the
NO_TORCHguard so GGUF-only installs skip MLX. Pinmlxandmlx-metalto 0.32.1,mlx-lmto 0.31.3, andmlx-vlmto>=0.4.4,<0.7.0, matching the supported requirements used by Zoo and MLX repair.Validation on an M3 Max with separate clean Studio directories and Python environments, with MLX auto-repair disabled:
chat_only=true, Export disabled.chat_only=false, Export enabled, and the MLX versions satisfy Zoo's requirements.--no-torchinstall: torch and MLX absent, UI available,chat_only=true.unsloth/gemma-3-270m-it: loss fell from 8.4531 to 0.0003. LoRA, merged 16-bit, and Q8_0 GGUF exports passed reload/inference checks and generatedUnsloth!.uv pip checkno longer reports the tokenizers or MLX pin mismatch. Six unrelated dependency warnings remain, all present in the parent environment.Additional isolated checks under the workspace:
The local host is macOS arm64. Linux and Windows matrix cases are simulations, not native GPU runs. A native Linux ARM clean-install CI check passed on installer commit
413473b7f; the broader native Windows/Linux results are still pending.Linux, Windows, and Intel Mac installation paths remain unchanged. This adds dependency work during Apple Silicon training installation; it does not add work to training or inference execution. Cross-hardware performance has not been benchmarked.