Skip to content

feat(metrics): consolidate gpt-oss/deepseek accuracy, dedup reporting, surface TPS#400

Open
arekay-nv wants to merge 9 commits into
mainfrom
arekay/feat-consolidate-accuracy-reporting
Open

feat(metrics): consolidate gpt-oss/deepseek accuracy, dedup reporting, surface TPS#400
arekay-nv wants to merge 9 commits into
mainfrom
arekay/feat-consolidate-accuracy-reporting

Conversation

@arekay-nv

Copy link
Copy Markdown
Collaborator

Summary

Deduplicates the reporting layer, gives gpt-oss-120b and deepseek-r1 a uniform per-subset accuracy breakdown, and surfaces TPS everywhere QPS appears.

Reporting dedup

  • New shared evaluation/accuracy_results.py (to_float, find_accuracy_breakdown, ACCURACY_METRIC_KEYS, build_breakdown); metrics/results_plots.py and compliance/checker.py now import it instead of their copy-pasted helpers.
  • results.json results block is single-sourced from the Report (drops the duplicate QPS recompute in execute.py).

Accuracy consolidation (uniform BFCL-shaped breakdown: overall_accuracy/subset_scores/total_samples, 0–100)

  • deepseek-r1: LegacyMLPerfDeepSeekR1Scorer now surfaces its per-subset breakdown via score_breakdown() (was discarded to a scratch file).
  • gpt-oss-120b: new GptOssAccuracyScorer runs the 3 member scorers once and rolls them up sample-weighted by unique problem count (matching endpoints-launch/…/generate_points.py). finalize_benchmark emits both the per-subset <subset>::gptoss entries (audit + downstream compat) and one consolidated gptoss entry with a breakdown — from the single scoring pass, no re-scoring.
  • Consolidation is opt-in via explicit accuracy_config.group (the ::variant suffix is a naming convention, not a grouping signal). Group members must return scalar scores in [0,1].
  • Accuracy now renders in Report.display() / report.txt / result_summary.json; the report is written in a finally so a scoring failure can't discard the perf run's artifacts.

TPS

  • Added to results.json; Report.display() gains a symmetric TPS: N/A branch.

Test plan

  • New unit tests: test_accuracy_results.py, test_gptoss_scorer.py, test_score_accuracy.py; extended deepseek/report/plots/checker tests. 412 unit tests pass; all pre-commit hooks pass.
  • This change was reviewed by a two-reviewer council (Codex + Claude); all findings (report-durability regression, implicit-grouping footgun, member-score validation, downstream-compat) are addressed.

Note: the full benchmark pipeline can't run on macOS (pin_loadgen() requires Linux; ZMQ IPC socket-path limit), so end-to-end integration runs on Linux CI. The grouping dispatch was verified directly.

🤖 Generated with Claude Code

@arekay-nv arekay-nv requested a review from a team July 8, 2026 00:55
@github-actions github-actions Bot requested a review from nvzhihanj July 8, 2026 00:55
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for consolidating multiple accuracy datasets into a single combined score using a consolidation group tag, which is particularly useful for rolling up subsets like gpt-oss (e.g., AIME25, GPQA, and LiveCodeBench) into a sample-weighted overall score. It extracts shared accuracy breakdown helpers into a new module, refactors compliance and plotting utilities to use them, and updates the benchmark finalization process to attach consolidated accuracy breakdowns to the report. The feedback suggests a cleaner and safer approach to retrieving the dataset sample count during per-subset audit entry generation by avoiding fragile assert statements and direct internal attribute access in favor of the public num_samples() API.

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.

Comment thread src/inference_endpoint/commands/benchmark/execute.py Outdated
…, surface TPS

Deduplicate the reporting layer, give gpt-oss-120b and deepseek-r1 a uniform
per-subset accuracy breakdown, and surface TPS everywhere QPS appears.

- Add shared evaluation/accuracy_results.py (to_float, find_accuracy_breakdown,
  ACCURACY_METRIC_KEYS, build_breakdown); metrics/results_plots.py and
  compliance/checker.py import it instead of copy-pasted helpers.
- DeepSeek-R1 scorer surfaces its per-subset breakdown via score_breakdown()
  (BFCL-shaped: overall_accuracy/subset_scores/total_samples, 0-100).
- Add GptOssAccuracyScorer: runs the 3 gpt-oss member scorers once and rolls
  them up sample-weighted by unique problem count. finalize emits both the
  per-subset <subset>::gptoss entries (audit + downstream compat) and one
  consolidated `gptoss` entry with a breakdown, from the single scoring pass.
- Consolidation is opt-in via explicit accuracy_config.group; the ::variant
  suffix is a naming convention, not a grouping signal. Group members must
  return scalar scores in [0,1].
- Add accuracy to Report.display()/report.txt/result_summary.json; write the
  report in a finally so a scoring failure can't discard perf artifacts.
- Single-source results.json qps/tps from Report (drop the duplicate QPS
  recompute); add tps + a symmetric "TPS: N/A" display branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@arekay-nv arekay-nv force-pushed the arekay/feat-consolidate-accuracy-reporting branch from 213b8c5 to 1ecb9e8 Compare July 8, 2026 01:01
Comment thread src/inference_endpoint/commands/benchmark/execute.py Outdated
@arekay-nv arekay-nv changed the title feat(metrics): consolidate gpt-oss/deepseek accuracy, dedup reporting, surface TPS DRAFT feat(metrics): consolidate gpt-oss/deepseek accuracy, dedup reporting, surface TPS Jul 8, 2026
Comment thread src/inference_endpoint/evaluation/scoring.py Outdated
Comment thread src/inference_endpoint/evaluation/scoring.py Outdated
arekay-nv and others added 5 commits July 8, 2026 14:37
…scorer

Add a single-entry composite path for gpt-oss-120b accuracy, mirroring the
DeepSeek-R1 model: one predefined dataset (`gptoss_120b_accuracy`) bundles the
three subsets (aime25/gpqa/livecodebench) behind a `subset` routing column, and
one registered scorer (`GptOss120bAccuracyScorer`, REQUIRES_EXTRACTOR=False)
routes per-subset grading in-process (aime->BoxedMath/exact, gpqa->ABCD/exact,
livecodebench->PythonCode via the lcb-service container), rolling the per-subset
means into one headline sample-weighted by unique problem count plus a per-subset
breakdown.

A config picks EITHER this composite dataset (one results.json entry with a
headline `score` on the 0-100 scale + `breakdown`) OR the existing individual
`::gptoss` datasets under `group: gptoss` (separate entries). Both paths coexist
unchanged.

- scoring.py: `GptOss120bAccuracyScorer` + shared helpers `_exact_match` and
  `_weighted_breakdown` (dedup PassAt1Scorer and GptOssAccuracyScorer, both kept
  behaviour-identical).
- dataset: `GptOss120bAccuracy` composes the 3 subsets at build time (each
  subset's own `gptoss()` preset renders `prompt`), caches a parquet; no
  committed artifact. num_samples stays the unique count; `max_samples` yields a
  stratified subset. Uniform num_repeats (per-subset 8/5/3 stays on the
  individual path).
- schema: `ScorerMethod.GPTOSS_120B_ACCURACY` (+ regenerated templates).
- example: examples/04_GPTOSS120B_Example/gptoss_120b_accuracy_example.yaml.
- tests: composite scorer (routing/weighting/0-100 scale/lcb-down), composite
  dataset (schema/rendering/caching), and example-resolve coexistence.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…try per dataset

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@arekay-nv arekay-nv requested a review from nvzhihanj July 9, 2026 01:37
@arekay-nv arekay-nv changed the title DRAFT feat(metrics): consolidate gpt-oss/deepseek accuracy, dedup reporting, surface TPS feat(metrics): consolidate gpt-oss/deepseek accuracy, dedup reporting, surface TPS Jul 9, 2026
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.

2 participants