Conversation
…lt_summary.json Add `events_sha256` to the Report struct so `performance/result_summary.json` carries a SHA-256 over the bytes of the run's events.jsonl. The digest is content-only (streamed via the new `utils.hashing.sha256_file` helper), so copying or renaming the log never changes it; it is null when no event log was produced (e.g. SIGKILL before salvage). Attached in `_write_report_artifacts` after the log is salvaged to report_dir, mirroring how accuracy is attached post-hoc. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #490 +/- ##
=======================================
Coverage ? 81.27%
=======================================
Files ? 152
Lines ? 20473
Branches ? 0
=======================================
Hits ? 16639
Misses ? 3834
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
Adds a content SHA-256 of the run's
events.jsonlto the benchmark report so arun's raw event log is fingerprinted and verifiable.
events_sha256on theReportstruct → serialized intoperformance/result_summary.json(alongsideqps/tps/run_config).via the new
utils/hashing.py::sha256_file), so copying or renaming the lognever changes the value, and large event logs are not read into memory at once.
nullwhen no event log was produced (e.g. SIGKILL before the tmpfs salvage),so finalization never crashes on a missing log.
_write_report_artifactsafter the log is salvaged toreport_dir, mirroring how per-dataset accuracy is attached post-hoc — keepingReport.from_snapshota pure snapshot→Report function.Changed files
utils/hashing.pysha256_file(path, *, chunk_size)util (mirrorsatomic_write.py)metrics/report.pyevents_sha256: str | Nonefield onReportcommands/benchmark/execute.py_write_report_artifactstests/unit/utils/test_hashing.pytests/unit/metrics/test_report_builder.pyto_jsonround-trips the fieldTesting
sha256_file: content-only (copy/rename → same digest, matches plainhashlib), differs on content change, missing file →None, large streamedinput.
Report.to_jsoncarriesevents_sha256and defaults tonull.report_builder+benchmark+benchmark_final_snapshotsuites pass(no regressions);
ruff/ruff-format/license headers clean.🤖 Generated with Claude Code