Skip to content

fix(lint): ruff clean on main; real F821 in logit-mode distill - #139

Merged
ronaldtse merged 1 commit into
mainfrom
fix/ruff-main
Sep 2, 2026
Merged

fix(lint): ruff clean on main; real F821 in logit-mode distill#139
ronaldtse merged 1 commit into
mainfrom
fix/ruff-main

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Main CI is red on ruff (15 errors accumulated across the concurrent merges). Fixes:

  • src/gpu/modal_distill.py F821 mtp_head x2 — REAL bug: the feat(e5): MTP-aux distillation rung — registered + implemented #114 MTP wiring pasted checkpoint lines into the logit-mode distiller save block where mtp_head is never defined; a logit-mode run would NameError at its first step checkpoint. Removed (they belong only in distill_sequence, which has its own save).
  • import sorting (I001) x5, unused zipfile import (F401), quoted annotation (UP037) — ruff autofix.
  • E501 signature wraps in modal_export/parity/test, zip strict=True in parity dump, with-open for models.yaml in modal-bench.

ruff check clean; all touched files compile. CI pytest is the authority for behavior (local env lacks the dev extras).

…still

The F821 was a real latent bug: MTP checkpoint lines from the #114
wiring were pasted into the logit-mode distiller save block where
mtp_head never exists — any logit-mode run would NameError at its
first step checkpoint. The lines belong only in distill_sequence.
The rest: import sorting, unused zipfile, quoted annotation, E501
signature wraps, zip strict=, context manager for models.yaml.
@ronaldtse
ronaldtse merged commit c8ad4ee into main Sep 2, 2026
11 checks passed
@ronaldtse
ronaldtse deleted the fix/ruff-main branch September 2, 2026 16:11
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