Skip to content

fix(use): replay each batch log once when admitting its member runs - #73

Merged
FeathBow merged 2 commits into
mainfrom
fix/batchadmission
Oct 22, 2026
Merged

FeathBow merged 2 commits into
mainfrom
fix/batchadmission

Conversation

@FeathBow

@FeathBow FeathBow commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Why

invar use admit and invar use inspect read every run entry on its own. A run that names a batch log read the whole log and its calls file into its own copy, and every admission of that run replayed the whole batch to take one member. On an evaluation of 2510 paired runs recorded in two batch logs of about 50 MB each, the first 10 and 40 entries showed about 1 GB and 21 seconds per entry, and the full admission ran out of memory.

What

  • A run's records are either its own log with its exit status, or its membership in a batch. A batch holds its declared plans and its admitted inferences, each indexed by binding, and is built only by Numerical.batched, so the replay always comes from that batch's calls, exit status and log.
  • Admitting a member looks up its binding in that index, checks that its plan is declared there, and requires exactly one admitted inference with its binding, as before. Admitting a standalone run is unchanged.
  • use admit, use inspect and compare numerical first check that runs naming one log declare the same batch and outcome, then read each batch log and its calls once, keyed by canonical path. Every run that names the log shares that batch.

Validation

The core suite, formatting, lint and the type fixtures pass, including a fixture that refuses constructing a batch directly. The Hugging Face and MLX worker suites pass.

On a complete earlier evaluation of 256 paired runs in two batch logs, the previous and the revised core gave identical output, including every observation and the decision. The previous core took 18 minutes and 30 GiB of peak memory, and the revised core took 16 seconds and 324 MiB. The full admission of the 2510 paired runs, with every problem scored and the decision computed, took 4 minutes 15 seconds and 2.9 GiB with the revised core.

Signed-off-by: Feathbow <feathbow@gmail.com>
…r batches

Signed-off-by: Feathbow <feathbow@gmail.com>
@FeathBow
FeathBow merged commit 565ad8a into main Oct 22, 2026
4 checks passed
@FeathBow
FeathBow deleted the fix/batchadmission branch October 22, 2026 10:03
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