Skip to content

CI: execute use_cache and mlx finetune_last_n_layers tests as a hard gate#755

Merged
danielhanchen merged 1 commit into
mainfrom
ci-execute-use-cache-and-mlx-tests
Jun 11, 2026
Merged

CI: execute use_cache and mlx finetune_last_n_layers tests as a hard gate#755
danielhanchen merged 1 commit into
mainfrom
ci-execute-use-cache-and-mlx-tests

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

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.

…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.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@danielhanchen danielhanchen merged commit 2e904f4 into main Jun 11, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant