Repository navigation
lab: the held-out guard looks everywhere, not just at config.split - #96
Merged
Merged
Conversation
The writer only restricted records whose top-level config.split was heldout, but tool records nest everything under result and carry no config, so a held-out submit written through Toolbox._record would have bypassed the one-aggregate-per-metric rule. - ledger._check: a "split": "heldout" anywhere outside claim marks the record held-out; it must then be declared as config.split with top-level config + metrics, else refused - Toolbox._record_heldout: the one way a tool writes a held-out result - tests: nested held-out under result/args/lists refused, a _record-shaped held-out refused, claims may name the split, the helper writes the accepted shape; seeding knowledge/ unchanged Co-Authored-By: Claude Opus 5.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.
Problem
ledger._checkonly applies the held-out rule (one aggregate per metric, nothing else) when a record has a top-levelconfig.split == "heldout". Tool records written throughToolbox._recordnest everything underresultand carry no top-levelconfig, so a held-out submit written that way would skip the rule and could store per-request held-out detail in the ledger.Change
lab/ledger.py: a"split": "heldout"anywhere in the record (outsideclaim) marks it held-out; it must then be declared as top-levelconfig.splitwith top-levelconfig+metrics, or it is refused.lab/tools.py:Toolbox._record_heldout, the one way a tool writes a held-out result in the accepted shape.result,argsor lists is refused; a_record-shaped held-out record is refused; claims may still name the split; the helper writes the accepted shape; seedingknowledge/is unchanged.lab/README.md: documents the rule.Notes
mainbut merges cleanly. The full suite passed on its base when written (485 tests); re-run before merging.🤖 Generated with Claude Code