Repository navigation
Move the Studio MLX pins to mlx 0.32.2 and mlx-vlm 0.7.1 - #11080
Conversation
The Studio installer pins the MLX stack it installs separately from unsloth-zoo's pyproject, and its own note says to keep the two in sync. unsloth-zoo is raising its ceiling to mlx-vlm 0.7.1 and mlx 0.32.2, so the installer and the self-heal move with it: `mlx` and `mlx-metal` to `==0.32.2`, `mlx-vlm` to `>=0.4.4,<=0.7.1`, `mlx-lm` unchanged. The two have to move together, because mlx-vlm 0.7.0 and 0.7.1 require `mlx>=0.32.2` and the raised ceiling would otherwise admit nothing. Resolving the new specification under this platform's own overrides selects mlx 0.32.2, mlx-metal 0.32.2, mlx-lm 0.31.3 and mlx-vlm 0.7.1 with transformers held at 5.5.0, so this does change which mlx-vlm a real install runs. mlx 0.32.1 and 0.32.2 publish the same wheels — macOS 14, 15 and 26 on arm64, CPython 3.10 and newer — so the minimum macOS and Python gates that guard this install are unchanged. 0.32.2 also retires the interpreter-finalization segfault that made 0.32.1 exit 139 when a fused Metal custom kernel was the last work a process did. Version mentions that record when a behaviour landed rather than what to install — mx.random.state becoming a read-only sentinel in 0.32.1, and 0.32.1 breaking model loading, which is why this install pins rather than floors — are left alone.
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. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. 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". |
The self-heal is default-on and unattended, and it installs mlx-vlm without touching unsloth-zoo. With the ceiling widened to 0.7.1 it could put 0.7.1 next to a zoo that predates the matching gated_delta_update fix; 0.7.1 passes cache= unconditionally, so Qwen3.5 VLM training raises TypeError at the first step, after mlx_stack_available has already cleared the chat-only gate. Read the range the installed zoo declares for mlx-vlm and pass it alongside ours so uv intersects the two. With unsloth-zoo 2026.9.3 installed this resolves to mlx-vlm>=0.4.4,<=0.7.1,<0.7.0,>=0.4.4, and it widens on its own once a zoo declaring 0.7.1 is installed, so no zoo version is named here. mlx and mlx-lm are left alone: they are pinned at both ends and intersecting them with a zoo one patch release behind would empty the range.
|
@codex security review |
The MLX step runs before the core phase, and install.sh hands off with SKIP_STUDIO_BASE=1, which skips that phase entirely, so on a fresh Apple Silicon install the zoo already on disk is the one that stays. The widened ceiling could therefore leave a pre-fix unsloth-zoo beside mlx-vlm 0.7.1, which is the TypeError at the first Qwen3.5 VLM training step. The narrowing added to utils/mlx_repair.py covered only the self-heal; apply the same rule here.
_mlx_stack_is_current tested the static range, so an already-installed 0.7.1 beside a zoo declaring <0.7.0 read as current and the step skipped the very install that would put mlx-vlm back where the zoo can drive it. Use the narrowed range there, in the closure manifest the audit reads, and in the health fingerprint, so a zoo change invalidates a recorded verdict.
The MLX step runs before the core phase, so it honours the range the OLD zoo declares. On a normal update that narrowed the stack to 0.6.x and then upgraded the zoo, leaving the machine there for good: the startup self-heal will not correct it either, since 0.6.x satisfies _MLX_MIN_VERSIONS, and the next update can take the dependency fast path. Compare the declared range after the core phase with the one the step used and re-resolve only when it moved, so the common update pays a metadata read. The slot is spent unconditionally on mac arm with torch, including the no-wheel branch, so the progress denominator stays independent of the host.
|
@codex 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". |
|
unsloth-zoo main still declares mlx==0.32.1 and mlx-vlm 0.4.4 to 0.7.0 in its darwin deps, and the zoo narrowing here only covers mlx-vlm, so an Apple Silicon install would get mlx 0.32.2 next to a zoo pinning 0.32.1. Could you confirm the zoo side lands first, and whether the mlx pin needs the same treatment before I review? |
1 similar comment
|
unsloth-zoo main still declares mlx==0.32.1 and mlx-vlm 0.4.4 to 0.7.0 in its darwin deps, and the zoo narrowing here only covers mlx-vlm, so an Apple Silicon install would get mlx 0.32.2 next to a zoo pinning 0.32.1. Could you confirm the zoo side lands first, and whether the mlx pin needs the same treatment before I review? |
…1080) * build(studio): move the MLX pins to mlx 0.32.2 and mlx-vlm 0.7.1 The Studio installer pins the MLX stack it installs separately from unsloth-zoo's pyproject, and its own note says to keep the two in sync. unsloth-zoo is raising its ceiling to mlx-vlm 0.7.1 and mlx 0.32.2, so the installer and the self-heal move with it: `mlx` and `mlx-metal` to `==0.32.2`, `mlx-vlm` to `>=0.4.4,<=0.7.1`, `mlx-lm` unchanged. The two have to move together, because mlx-vlm 0.7.0 and 0.7.1 require `mlx>=0.32.2` and the raised ceiling would otherwise admit nothing. Resolving the new specification under this platform's own overrides selects mlx 0.32.2, mlx-metal 0.32.2, mlx-lm 0.31.3 and mlx-vlm 0.7.1 with transformers held at 5.5.0, so this does change which mlx-vlm a real install runs. mlx 0.32.1 and 0.32.2 publish the same wheels — macOS 14, 15 and 26 on arm64, CPython 3.10 and newer — so the minimum macOS and Python gates that guard this install are unchanged. 0.32.2 also retires the interpreter-finalization segfault that made 0.32.1 exit 139 when a fused Metal custom kernel was the last work a process did. Version mentions that record when a behaviour landed rather than what to install — mx.random.state becoming a read-only sentinel in 0.32.1, and 0.32.1 breaking model loading, which is why this install pins rather than floors — are left alone. * Do not self-heal onto an mlx-vlm the installed unsloth-zoo excludes The self-heal is default-on and unattended, and it installs mlx-vlm without touching unsloth-zoo. With the ceiling widened to 0.7.1 it could put 0.7.1 next to a zoo that predates the matching gated_delta_update fix; 0.7.1 passes cache= unconditionally, so Qwen3.5 VLM training raises TypeError at the first step, after mlx_stack_available has already cleared the chat-only gate. Read the range the installed zoo declares for mlx-vlm and pass it alongside ours so uv intersects the two. With unsloth-zoo 2026.9.3 installed this resolves to mlx-vlm>=0.4.4,<=0.7.1,<0.7.0,>=0.4.4, and it widens on its own once a zoo declaring 0.7.1 is installed, so no zoo version is named here. mlx and mlx-lm are left alone: they are pinned at both ends and intersecting them with a zoo one patch release behind would empty the range. * Intersect the installer's mlx-vlm range with the installed zoo too The MLX step runs before the core phase, and install.sh hands off with SKIP_STUDIO_BASE=1, which skips that phase entirely, so on a fresh Apple Silicon install the zoo already on disk is the one that stays. The widened ceiling could therefore leave a pre-fix unsloth-zoo beside mlx-vlm 0.7.1, which is the TypeError at the first Qwen3.5 VLM training step. The narrowing added to utils/mlx_repair.py covered only the self-heal; apply the same rule here. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Consult the installed zoo range in the skip predicate too _mlx_stack_is_current tested the static range, so an already-installed 0.7.1 beside a zoo declaring <0.7.0 read as current and the step skipped the very install that would put mlx-vlm back where the zoo can drive it. Use the narrowed range there, in the closure manifest the audit reads, and in the health fingerprint, so a zoo change invalidates a recorded verdict. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Re-resolve MLX after the core phase moves unsloth-zoo The MLX step runs before the core phase, so it honours the range the OLD zoo declares. On a normal update that narrowed the stack to 0.6.x and then upgraded the zoo, leaving the machine there for good: the startup self-heal will not correct it either, since 0.6.x satisfies _MLX_MIN_VERSIONS, and the next update can take the dependency fast path. Compare the declared range after the core phase with the one the step used and re-resolve only when it moved, so the common update pays a metadata read. The slot is spent unconditionally on mac arm with torch, including the no-wheel branch, so the progress denominator stays independent of the host. --------- Co-authored-by: danielhanchen <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Summary
Moves the MLX stack the Studio installer and the MLX self-heal install to mlx 0.32.2 and mlx-vlm 0.7.1, matching the ceiling raise in unsloth-zoo (unslothai/unsloth-zoo#1244).
mlx_repair.py's own note already says these pins are kept in sync with unsloth-zoo's darwin dependencies.mlx==0.32.1==0.32.2mlx-metal==0.32.1==0.32.2mlx-vlm>=0.4.4,<0.7.0>=0.4.4,<=0.7.1mlx-lm==0.31.3The two versions have to move together: mlx-vlm 0.7.0 and 0.7.1 require
mlx>=0.32.2, so the raised ceiling would admit nothing while mlx stayed at 0.32.1.This changes which mlx-vlm a real install runs
Resolving the new specification under this platform's own overrides (
transformers>=5.5.0,<=5.5.0,anyio<4.14.0,huggingface_hub>=1.23.0,<2.0) selects:Because the transformers override replaces mlx-vlm's own
transformers>=5.14.0requirement rather than constraining it, the resolver is free to take 0.7.1; previously the<0.7.0ceiling held it on the 0.6 line. This is a real behaviour change, not a no-op version string.Ordering requirement, and a residual exposure reviewers should weigh
mlx-vlm 0.7.1 passes
cache,cache_indexandstate_stepstogated_delta_update. An unsloth-zoo without the matching fix raisesTypeErrorthere, and Qwen3.5 VLM training cannot start. This should not be merged before unsloth-zoo carries that fix.Merge order alone does not fully close it, and that is a deliberate, accepted tradeoff rather than an oversight. The MLX self-heal (
attempt_mlx_repair) installs only mlx, mlx-lm and mlx-vlm, and the installer's MLX step likewise runs independently of the core phase that installs unsloth-zoo. Either path can therefore upgrade mlx-vlm in an environment that keeps an older unsloth-zoo, and such an environment stays exposed until its zoo is updated. The alternatives considered were holding the ceiling until a zoo release carries the fix, or deriving the bound from the installed zoo's declared requirement instead of a copied literal; the latter remains available as a follow-up if this exposure is judged too wide.Wheel coverage and the install gates are unchanged
mlx and mlx-metal publish the same wheels at 0.32.1 and 0.32.2 —
macosx_14_0,macosx_15_0andmacosx_26_0on arm64, CPython 3.10 and newer — so_MLX_MIN_PYTHON(3, 10) and_MLX_MIN_MACOS_MAJOR14 still hold and are deliberately untouched.test_pin_floor_is_revisited_whenever_the_pins_moveexists to force that check whenever these pins move, and it passes.A defect the bump retires
The note explaining the old pin recorded that 0.32.1 was taken with a known defect: it segfaulted at interpreter finalization when a fused Metal custom kernel was the last work a process did. On 0.32.2 the shape unsloth-zoo's
tests/_run_then_exit_hard.pydocuments as exiting 139 exits 0 on three consecutive runs, so the note has been rewritten accordingly.Deliberately not rewritten
Three version mentions record when a behaviour landed rather than what to install, and remain true:
mx.random.statebecame a read-only sentinel in mlx 0.32.1 (mlx_inference.py, and two tests)Validation
The two failures are
test_a_venv_that_already_has_pip_does_not_reinstall_itandtest_a_pip_that_cannot_run_is_bootstrapped_again. They concern pip bootstrapping, not MLX, and fail identically on a clean checkout of the target branch with none of this applied.