Repository navigation
mm31 oracle: a resume refuses the state of another cut generation - #1118
Conversation
There was a problem hiding this comment.
Verdict: MUST_FIX: An accepted incomplete fixture line still lets a changed cut reuse saved state.
Must fix
1. Require every cut identity key before trusting the fixture line
tools/ref/mm31/dump_tf.py:1159 adds caller-supplied text to the identity, but fixture_line:1050 checks only the supplied keys. Pass # fixture<TAB>bloomery.fixture.rev=<REV>, pause prefill, regenerate the same folder with different source layers for an already processed layer, and resume with the same argument and unchanged index/config. Both lines pass validation and both identities remain equal. restore:1305 accepts the previous cut's hidden states and taps, mixing saved results with the new cut. Isolated execution of the source functions confirmed acceptance and restoration.
Fixing this before regenerating sets avoids another round of invalid oracle outputs. Insert this immediately before return given[len(prefix):] in fixture_line, add an omitted-key refusal case, and refresh the writer hash pin:
if set(held) != set(keys) - {FIXTURE_KEY + "card_budget"}:
raise Refusal("--fixture-line must name every cut identity key except card_budget")Checked
Duplicates: the new test covers cut identity rather than the existing writer/set refusal cases. Dryer reported 0 pairs.
Complexity: crapper flagged no functions; the production change adds one identity field and changes two messages.
Silent failure: both resume identity checks were followed; an accepted incomplete fixture line leaves them unchanged across a cut change.
Tests: the new test protects dump_tf.py:1159. Its helper recomputes the full fixture line after changing metadata. Removing self.fixture makes the identities equal and defeats its refusal assertion; isolated identity mutation confirmed this.
Gates: BUILD has a dated PIN and reason; its MD5 matches the writer. No tolerance moved.
Escape catalog: C1–C4 do not match. The diff changes tools and reference identity code, with no inference hot path.
Notes
Full dependency-backed tests were not run. The identity/restore behavior, proposed guard, and writer pin were checked in isolation.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
Filed outside this PR: #1121
3c9cfef to
6c94f4e
Compare
There was a problem hiding this comment.
Since the last review: Must-fix 1 is fixed. tools/ref/mm31/dump_tf.py:1051 checks every shard identity key and rejects omitted or additional keys.
Verdict: CLEAN: The interdiff closes the incomplete fixture-line validation defect, with no remaining must-fix finding.
Checked
- Duplicates: 0 new definitions in the interdiff. Dryer reported 0 pairs.
- Complexity: crapper flagged no functions. The validation loop now checks the union of expected and supplied keys.
- Silent failure: 3 refusal paths followed. Invalid fixture lines and mismatched prefill or greedy identities produce a named Refusal, returned as exit 65.
- Tests: 9 source-defined refusal cases passed in isolation; all 63 incomplete key subsets were rejected. A supplied-key-only mutant at dump_tf.py:1051 accepts both added omission cases. Both resume guards reject a changed cut identity.
- Gates: BUILD has a dated PIN and reason; its MD5 matches the writer. No tolerance moved. Excluding the card budget matches refset's contract.
- Escape catalog: C1–C4 do not match. The changes affect oracle tooling and a writer pin; no inference hot path changes.
Notes
The full dependency-backed suite was not run. Validation used isolated production functions, source-defined test cases and mutation checks.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
The review is done and the contribution check passed, so I'm merging this. |
MiniMax-M3.1 oracle의
--resume이 다른 cut 세대의 저장 상태를 거부하도록 고쳤습니다.What and why
Fixes #1117. The oracle writer
tools/ref/mm31/dump_tf.pykeyed a saved prefill or greedy state on the writer, folder, index, config, model code and torch, but not on the cut's fixture line. A cut regenerated from other layers keeps the same tensors, index and config, so--resumeaccepted the old state and wrote sets from the wrong cut. The resume identity now carries the fixture line, and both resume paths (prefill and greedy) refuse the state with a named error. The writer changed, so theminimaxm31build pin moves to the new md5; sets already dumped need a re-dump. The dumper also requires--fixture-lineto state everybloomery.fixture.*key of the first shard except the card budget, each once with the shard's value, and refuses a line that leaves a key out or adds one. A partial line such as# fixture<TAB>bloomery.fixture.rev=<REV>would otherwise keep the resume identity equal across a regenerated cut.Release notes: Fixed: the MiniMax-M3.1 oracle writer no longer resumes a saved state that belongs to another cut of the model.
Code shape
The review reads these first. A box left unticked needs one line of why.
copying it (
AGENTS.md"Common code first",docs/rust-quality.mdR14). Where I found an existing copy, Inamed it below.
(tensor shapes, the attention kind, the quant). A common owner gained no per-model branch, flag or trait method.
tools/check-comments.sh).PIN(YYYY-MM-DD):and its reason.
cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed (
path:line), or "none": none.What I ran
Upstream base
7394839c9b9a613d905eb7cef49205e8d8956576, PR head6c94f4eb1ea46338c858526242f84da22e9f194c.The new test
Refusals.test_resume_refuses_state_of_another_cut_generationstops a prefill with--until 1, rewrites the first shard's metadata tobloomery.fixture.layers=0,1,3(tensors, index and config unchanged), and resumes. The resume must be refused.Before the fix (base
dump_tf.pywith the new test):After the fix (transformers 5.12.1, torch 2.14.1+cpu, requirements from
tools/ref/mm31/requirements.txt):The refset pin test on the new writer md5:
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.