Repository navigation
fix(use): replay each batch log once when admitting its member runs - #73
Merged
Merged
Conversation
Signed-off-by: Feathbow <feathbow@gmail.com>
…r batches Signed-off-by: Feathbow <feathbow@gmail.com>
4 tasks
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.
Why
invar use admitandinvar use inspectread 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
Numerical.batched, so the replay always comes from that batch's calls, exit status and log.use admit,use inspectandcompare numericalfirst 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.