Skip to content

fix(mlx-ci): align smoke step count assertion#5622

Closed
Lyxot wants to merge 2 commits into
unslothai:mainfrom
Lyxot:fix-mlx-smoke-step-count
Closed

fix(mlx-ci): align smoke step count assertion#5622
Lyxot wants to merge 2 commits into
unslothai:mainfrom
Lyxot:fix-mlx-smoke-step-count

Conversation

@Lyxot

@Lyxot Lyxot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Updates the real MLX smoke test to assert the logged step count against config.max_steps instead of the stale hardcoded 7.
  • Refreshes the smoke-test docstring and MLX CI workflow comment to match the current 30-step training gate.
  • Corrects nearby smoke documentation for the LoRA target set and teacher-forced completion-loss gate.

Why

The smoke was changed to train for 30 steps in #5537, but the post-train callback assertion still expected 7 logged steps. Real MLX training completes and converges, then CI fails on the stale harness assertion.

Copilot AI review requested due to automatic review settings May 19, 2026 14:41

Copilot AI 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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Aligns the real MLX smoke test assertion and docs with the current 30-step training configuration introduced in #5537.

Changes:

  • Replaces hardcoded 7 in the step count assertion with config.max_steps.
  • Updates docstring to reflect 30 steps, 180 total sequences, and the teacher-forced completion-loss gate.
  • Updates LoRA target description and the MLX CI workflow comment to match current behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/studio/run_real_mlx_smoke.py Fixes step count assertion and refreshes docstring for LoRA targets, step count, and completion gating.
.github/workflows/mlx-ci.yml Updates CI workflow comment from 7 to 30 deterministic LoRA steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the run_real_mlx_smoke.py test script by expanding LoRA target modules to include gate, up, and down layers, and increasing the training duration from 7 to 30 steps. The validation logic was also updated to support regression telemetry. A review comment suggests improving the assertion error message to display the actual count of logged steps rather than the entire list of losses for better clarity.

if k in train_result
}
assert len(losses_per_step) == 7, f"expected 7 logged steps, got {losses_per_step}"
assert (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The assertion error message is confusing as it prints the entire list of losses instead of the count. It is better to use dynamic configuration values like config.max_steps for clarity, ensuring the message accurately reflects the expected state.

assert len(losses_per_step) == config.max_steps, f"expected {config.max_steps} logged steps, got {len(losses_per_step)}"
References
  1. User-facing warning messages should be dynamically generated to include the specific configuration values they refer to, rather than using hardcoded examples.

@Datta0

Datta0 commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Hey @Lyxot thanks for the contribution but I think this is handled in #5656

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.

3 participants