Stage the base builder into checkpointed processes with a bit-equivalence proof#406
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nce suite on pytables Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The reusable base builder becomes a staged, checkpointed pipeline:
--stage {a,b,c,d,all}+--checkpoint-dir, with each stage runnable as its own process so its memory dies with it.--stage allwith no checkpoint dir is byte-identical to today's behavior.Why
Four OOM kills at full scale (79–92GB dirty RSS on a 128GB host) across escalating mitigations (#401 chunked predict, #402 forest release, worker/batch reductions) — the single-process design accretes stages and outgrew the machine. Stack-sample + per-stage profiling localized the drivers; a blind cross-model design review found two failure modes parameter tuning could never fix.
The fixes, per the reconciled design
_snap_to_observed_valuesmemory bound: the recipient×unique-values matrix was unbounded (a latent fifth OOM independent of staging); now chunked, bit-identical, unit-tested.stage_profile.json.The proof
test_us_puf_support_base_equivalence.py: staged-vs-monolith bit equivalence on a subsample under a pinned single-thread environment, compared at every stage boundary (raw-bit observer via--equivalence-boundary-dir), with deterministic H5 metadata mode disabling leaf timestamps. Full suite green locally (exit 0), plus the checkpoint round-trip identity suite and builder tests (53 green).First consumer: Build M's base rebuild, immediately on merge.