CI: execute use_cache and mlx finetune_last_n_layers tests as a hard gate#755
Conversation
…gate test_mlx_finetune_last_n_layers was born broken in #669 and stayed invisible until #739 because no CI job executed it: the version matrix only collects, the macOS MLX job runs the shim smoke test alone, and the zoo-specific CPU list does not include it. Add a small hard-gate step in repo-tests-cpu running it together with test_training_utils_use_cache (the use_cache disable/restore contract from #715). Both files are CPU-pure and run in under a second, and the job already installs the deps they need.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7939b4969a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| # (#715). Executing both here keeps fixture/source drift visible. | ||
| run: | | ||
| python -m pytest \ | ||
| tests/test_training_utils_use_cache.py \ |
There was a problem hiding this comment.
Set Unsloth presence before hard-gating training utils
In the repo-tests-cpu Linux job this new hard gate collects tests/test_training_utils_use_cache.py, which imports unsloth_zoo.training_utils at module import time. Unlike the core-upstream-matrix job, this job never exports UNSLOTH_IS_PRESENT, and unsloth_zoo/__init__.py raises on the non-MLX path when that env var is absent, so the new hard-gated pytest invocation fails during collection before exercising the intended tests. Please set the same env handshake for this job/step or import through the path that establishes it first.
Useful? React with 👍 / 👎.
Follow-up to #739. That PR fixed test_get_peft_model_passes_finetune_last_n_layers_through, which had been failing since #669 introduced it, but the reason it stayed invisible is still in place: no CI job executes the file. The Python version matrix runs pytest --collect-only, mlx-ci runs only the torch shim smoke test on macOS, and the zoo-specific CPU list in repo-tests-cpu does not include it.
This adds a small hard-gate step to repo-tests-cpu that executes two deterministic, CPU-pure files:
Both run in under a second locally (16 tests), and repo-tests-cpu already installs everything they need (CPU torch, core extras, unsloth no-deps). Kept as a separate step from the continue-on-error zoo list so a regression in these contracts actually blocks.