From c4c2b2aefba837c6758e029d4e3fb00a78d792bf Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 7 May 2026 03:03:12 +0000 Subject: [PATCH] ci(mlx): install unsloth-zoo from git main on the macOS job The macOS Apple Silicon job failed on its first run with NotImplementedError: Unsloth currently only works on NVIDIA, AMD and Intel GPUs. surfaced from `unsloth_zoo.device_type.get_device_type()`. The cause is the version pin: `pip install 'unsloth_zoo>=2026.5.1'` resolves to the most recent PyPI wheel, which predates PR #620 and therefore predates the `_is_mlx_only` gate in `unsloth_zoo/__init__.py` that short-circuits the GPU device-type probe on Darwin+arm64+mlx. Switch to `pip install --no-deps "unsloth_zoo @ git+https://github.com/unslothai/unsloth-zoo"` so the macOS job sees the merged main branch and exercises the actual MLX dispatch code. Studio's own `install.sh` does this for exactly the same reason. This is also the smoking gun the macOS runner exists to catch: the spoofed Linux job cannot reproduce a stale PyPI/zoo pairing because it never imports through device_type. The first real Mac run found the gap on its first try. --- .github/workflows/mlx-ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mlx-ci.yml b/.github/workflows/mlx-ci.yml index 7b105a23c5..824f109b6c 100644 --- a/.github/workflows/mlx-ci.yml +++ b/.github/workflows/mlx-ci.yml @@ -114,12 +114,19 @@ jobs: # without any spoofing -- exactly the conditions unsloth._IS_MLX # checks for. Once mlx is on the path the gate flips True and the # MLX import branch in unsloth/__init__.py runs. - - name: Install deps (real mlx + unsloth + unsloth-zoo) + # + # Install unsloth_zoo from git main rather than PyPI: the PR-A + # MLX support (#620) merged AFTER the most recent unsloth_zoo + # release, so the PyPI wheel still raises NotImplementedError on + # Apple Silicon at `device_type.get_device_type()`. Studio's own + # install.sh overlays unsloth-zoo from git main for the same + # reason; we mirror that here. + - name: Install deps (real mlx + unsloth + unsloth-zoo from git) run: | python -m pip install --upgrade pip pip install mlx mlx-lm pip install pytest pytest-asyncio - pip install 'unsloth_zoo>=2026.5.1' + pip install --no-deps "unsloth_zoo @ git+https://github.com/unslothai/unsloth-zoo" pip install -e . --no-deps - name: Verify _IS_MLX flips True on real Apple Silicon