Batch evaluation: crown the best challenger, not the fastest#2
Open
angosr wants to merge 1 commit into
Open
Conversation
Instead of crowning the first challenger that passes delta, collect up to BATCH_MAX challengers, evaluate all on the same shard with shared king baseline, and select the one with highest mu_hat. King losses are computed once per batch for efficiency. New env var TEUTONIC_BATCH_MAX (default 5) controls batch size. Set to 1 to restore legacy first-to-pass behavior.
6c1a5da to
9c7dc12
Compare
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.
Background
The current validator crowns the first challenger that passes the bootstrap threshold (LCB > delta). This rewards submission speed rather than model quality — miners race to submit first instead of training better models.
What this PR does
Adds a batch evaluation mode: instead of accepting the first passing challenger, the validator collects pending submissions into a batch, evaluates all of them on the same shard and sequences, then selects the one with the highest μ̂.
Key design choices:
TEUTONIC_BATCH_MAXenv var (default 5). Set to 1 to restore the original first-to-pass behavior.Changes
eval_torch.py: Two new functions (compute_king_baseline,eval_challenger_against_baseline) that decomposerun_bootstrap_testinto reusable phases. Original function untouched.eval_server.py: Two new endpoints (POST /eval/king-baseline,POST /eval/challenger). OriginalPOST /evaluntouched.validator.py: Newprocess_batch()function and main loop branching onBATCH_MAX.