Skip to content

Record calibration journals by content digest and verify them - #1694

Open
astrogilda wants to merge 1 commit into
mlcommons:mainfrom
astrogilda-forks:journal-content-digests
Open

astrogilda wants to merge 1 commit into
mlcommons:mainfrom
astrogilda-forks:journal-content-digests

Conversation

@astrogilda

Copy link
Copy Markdown

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.

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>
@astrogilda
astrogilda requested a review from a team as a code owner October 9, 2026 10:17
@astrogilda
astrogilda deployed to Scheduled Testing October 9, 2026 10:17 — with GitHub Actions Active
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

This branch was successfully deployed

1 active deployment
Scheduled Testing — 522f9301 Deployed Oct 9, 2026 by astrogilda via build #2596
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