feat(report): record run_config (seeds + load/warmup) in result_summary.json#377
Conversation
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to resolve the package's git commit SHA using git archive's export-subst feature via a new _git_archival.txt file, falling back to running git rev-parse anchored to the package directory. It also reorders the serialized JSON output of metrics reports to surface key throughput and run identity fields first. Feedback is provided regarding a potential issue where git rev-parse could traverse up to a parent repository if the package is installed in a virtual environment within an unrelated git repository, along with a suggestion to check for the existence of the .git directory first.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…sha hack Pivot to dynamic VCS versioning per review on #377: - build backend uv_build -> hatchling + hatch-vcs; version is now `dynamic`, derived from git (nearest tag + commits-since + short SHA), written to src/inference_endpoint/_version.py at build time (gitignored). __version__ reads it. - the commit SHA is embedded in the version string itself (e.g. 0.6.dev3+g6eac351), so the report's version is self-identifying for submitters; the stale hardcoded 0.1.0 (unchanged since the first commit) is gone. - get_git_sha now just parses the +g<sha> local segment from __version__ — drops the cwd-dependent `git rev-parse` and the hand-rolled _git_archival.txt parsing. - git-archive/sdist/container builds (no .git) recover the version via the standard setuptools_scm .git_archival.txt export-subst. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per review on #377: - Drop the result_summary.json key reordering (qps/tps after git_sha) — hard to maintain; Report.to_json goes back to plain field-order serialization. - Add a 'loadgen' field to Report: the run's load-generation settings (benchmark mode, load pattern, target qps/concurrency, n_samples, duration bounds, workers), sourced from config at finalize like 'seeds'. Serialized into result_summary.json and rendered as a 'Load settings:' line in report.txt. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
728749f to
4fe34b3
Compare
4fe34b3 to
bd458f5
Compare
10c1e36 to
bdcc983
Compare
…ry.json Snapshot the run's load_pattern, warmup, and the scheduler/dataloader RNG seeds into the report so result_summary.json is self-describing and a valid run is identified by its settings. Rendered as a 'Run config:' block in report.txt. endpoint_config (api_key/URLs) is a sibling of settings and never included, so no secrets leak. Replaces the standalone 'seeds' field (#353). The resolved/effective runtime settings (sample count + ordering, which can differ per audit phase) are left for a follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bdcc983 to
40875f7
Compare
Summary
Record the run's load config + RNG seeds in the benchmark report so a run is self-describing and validatable from its own
result_summary.json(andreport.txt).A single
run_configfield onReportcarries:load_pattern(type / target_qps / concurrency /use_legacy_loadgen_qps_metrics— needed to interpret qps/tps),warmup(incl.warmup_random_seed),scheduler_random_seed+dataloader_random_seed.load_pattern/warmupcome fromsettings.model_dump(include={"load_pattern", "warmup"}); the seeds are read offsettings.runtime.endpoint_config(api_key / endpoint URLs) is a sibling ofsettingsand never included, so no secrets leak. The full, re-runnable config still lives inconfig.yamlalongside.Replaces the standalone
seedsfield (#353): the RNG seeds now live underrun_config.Example
result_summary.jsonFrom a real DGX-B300x8 DeepSeek-R1 server (poisson) run —
qps/tpsstay top-level, run config underrun_config(metric dicts elided as{ ... }):{ "version": "0.1.0", "git_sha": "...", "n_samples_completed": 40000, "duration_ns": 3328465383747, "state": "complete", "complete": true, "ttft": { ... }, "tpot": { ... }, "latency": { ... }, "output_sequence_lengths": { ... }, "legacy_loadgen_window_duration_ns": 2753346633148, "qps": 14.53, "tps": 54489.98, "run_config": { "load_pattern": { "type": "poisson", "target_qps": 14.75, "target_concurrency": null, "use_legacy_loadgen_qps_metrics": true }, "warmup": { "enabled": false, "n_requests": null, "salt": true, "drain": false, "warmup_random_seed": 42 }, "scheduler_random_seed": 42, "dataloader_random_seed": 42 } }Same, rendered in
report.txt:Tests
run_configkeyword-only passthrough; serialization +report.txtrendering; absent ->null.Rebased on latest
main(keeps PR #372'suse_legacy_loadgen_qps_metrics; git_sha handled by #398).🤖 Generated with Claude Code