Skip to content

fix(parity): resume at the next pending precision after preemption - #152

Merged
ronaldtse merged 1 commit into
mainfrom
parity-stage-skip
Sep 3, 2026
Merged

fix(parity): resume at the next pending precision after preemption#152
ronaldtse merged 1 commit into
mainfrom
parity-stage-skip

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Why

The 2.1 parity chain spent the day in a preemption loop: Modal restarts
the function with the same input, but the precision loop redid fp32 and
fp16 decode (~4h) on every restart before reaching the pending int8
stage — which then got preempted again.

What

  • pending_precisions(out_dir, mid, precisions): a stage is complete
    when its *-margins-{precision}.json report exists — that is the last
    artifact the stage writes (after the parity block lands in the zip).
  • parity_model now iterates only pending stages; durable stages are
    skipped, so restarts resume at the next precision.

Evidence

  • 3 new tests (skip / fresh / partial-zip-without-report reruns)
  • Full suite: 122 passed
  • Live ledger showing the redo loop: parity_stages.jsonl on
    secryst-models (fp32/fp16 reported done repeatedly)

Each restart redid every precision stage (~4h of fp32+fp16 decode)
because the loop had no completion check. The margin report is the
last artifact a stage writes, so its presence on the volume marks the
stage durably complete; restarts now skip straight to the pending one.
@ronaldtse
ronaldtse merged commit 4edce57 into main Sep 3, 2026
11 checks passed
@ronaldtse
ronaldtse deleted the parity-stage-skip branch September 3, 2026 15:23
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