From efcd2ccf19afd5931eeef47817599ed27eb78823 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 6 May 2026 12:13:21 +0000 Subject: [PATCH] ci(mlx): fix path filter that pointed at a non-existent file The MLX CI workflow listed ``studio/backend/utils/hardware.py`` as a path filter, but no such file exists. The actual layout is studio/backend/utils/hardware/ __init__.py amd.py hardware.py nvidia.py vram_estimation.py so the filter as written would never match. A reviewer modifying ``hardware/hardware.py`` (where ``detect_hardware``, ``DeviceType``, and ``IS_ROCM`` actually live) would not trigger MLX CI, which defeats the point of the focused PR gate. Replace the broken filter with ``studio/backend/utils/hardware/**`` so any change in the hardware probe directory triggers MLX CI, and add three sibling triggers that each materially affect dispatch: - ``unsloth/_gpu_init.py`` Hosts ``from .models import *`` and the ``from .trainer import *`` chain. The trainer.py circular-import fix that landed in ``23550a8`` lives downstream of this file; a future change here can re-introduce the same bug. - ``studio/backend/core/inference/mlx_inference.py`` The MLX inference backend itself. It is the actual consumer of ``unsloth_zoo.mlx_loader.FastMLXModel`` whose contract the test_mlx_training_worker_behaviors.py AST checks guard. Local re-run with the fix in place: 36 passed in 0.45s. No other workflow file or test file is modified. --- .github/workflows/mlx-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mlx-ci.yml b/.github/workflows/mlx-ci.yml index f2daeb65f9..8103643fce 100644 --- a/.github/workflows/mlx-ci.yml +++ b/.github/workflows/mlx-ci.yml @@ -26,8 +26,10 @@ on: pull_request: paths: - 'unsloth/__init__.py' - - 'studio/backend/utils/hardware.py' + - 'unsloth/_gpu_init.py' + - 'studio/backend/utils/hardware/**' - 'studio/backend/core/training/worker.py' + - 'studio/backend/core/inference/mlx_inference.py' - 'tests/studio/test_hardware_dispatch_matrix.py' - 'tests/studio/test_is_mlx_dispatch_gate.py' - 'tests/studio/test_mlx_training_worker_behaviors.py'