Repository navigation
Record calibration journals by content digest and verify them - #1694
Open
astrogilda wants to merge 1 commit into
Open
astrogilda wants to merge 1 commit into
astrogilda wants to merge 1 commit into
Conversation
Standards.from_runs stored only each journal's file name, so a different run saved under the same name could not be told apart from the one the standards were calibrated on. Record a SHA-256 with each name and add Standards.verify_journals, which rejects a missing journal, a journal whose bytes changed, and an entry with no recorded digest. Also cover load_scoring_config's SHA-256 pin, which had no test. Signed-off-by: Sankalp Gilda <23521054+astrogilda@users.noreply.github.com>
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
This branch was successfully deployed
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.
A standards file lists its calibration journals by file name only, so a copied or regenerated journal with the same name looks like the original.
This change stores a SHA-256 next to each journal name and adds
Standards.verify_journals, which raises when a journal is missing, changed or has no digest.Standards files written before this change have no digests; they still load, and verify_journals raises on them.
It also adds two tests for
load_scoring_config, which had none: a config not matching its expected SHA-256 is refused, and a matching one loads.One new standards test rewrites a journal under the same name and expects the digest error.