Skip to content

feat(metric-benchmark): correlate matched subset scores - #97

Merged
mstaats-nvidia merged 3 commits into
mainfrom
feat/metric-benchmark-correlation
Oct 31, 2026
Merged

mstaats-nvidia merged 3 commits into
mainfrom
feat/metric-benchmark-correlation

Conversation

@mstaats-nvidia

@mstaats-nvidia mstaats-nvidia commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Correlate coverage and mutant scores by exact subset ID and matching experiment context, using Spearman ranks with average ties. Preserve paired observations, input digests, and explicit exclusions. Constant ranks and fewer than two usable pairs produce an unavailable coefficient with missing_score_reason; negative mutant scores remain valid.

correlate.py owns main(), argument parsing, artifact loading, and output writing. metric_benchmark.correlation contains the reusable models and calculation. The CLI and coordinator call the same correlate() function; correlation needs only the two score artifacts and the missing-pair policy.

Usage and library API: labs/metric-benchmark/docs/correlate.md. Based on main after #96; #99 consumes this library downstream.

Validation at a864afa: 3,441 passed, 36 skipped in the full local suite. The skips cover unavailable or opt-in runtimes/platforms (Gym, Node/browser rendering, Docker, pinned SkillEvaluator, Ratchet, Windows, and live Codex). All five focused correlation tests pass, including byte-identical CLI/library output. Ruff, formatting, type checks for Python 3.12/3.13, copyright, licenses, whitespace, and DCO checks pass. The CLI move preserves the function bodies and command help description. Hosted CI passed on this head, including the Python 3.12/3.13 full suites and native compatibility checks.

@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch from f311eb8 to dff36b6 Compare October 21, 2026 20:22
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch 2 times, most recently from 8082251 to 913bc3b Compare October 21, 2026 21:08
@mstaats-nvidia mstaats-nvidia changed the title feat(metric-benchmark): correlate matched coverage and mutant scores feat(metric-benchmark): correlate matched subset scores Oct 21, 2026
@mstaats-nvidia
mstaats-nvidia added this pull request to stack #107 October 21, 2026 21:10
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch from 913bc3b to 5dde419 Compare October 23, 2026 14:33
mstaats-nvidia added a commit that referenced this pull request Oct 23, 2026
Defines an experimental benchmark for evaluating how well our coverage
metric predicts evaluation effectiveness through mutation testing.

The concise [root
README](https://github.com/NVIDIA-NeMo/eval-author/blob/docs/metric-benchmark-design/labs/metric-benchmark/README.md)
describes the project, its work-in-progress status, and the expectation
that case examples will grow, change, or be dropped as we build in plain
sight. Prep is external to this repository; runs consume prepared case
examples, fixed subset manifests, and a YAML benchmark definition.

The [stage
descriptions](https://github.com/NVIDIA-NeMo/eval-author/blob/docs/metric-benchmark-design/labs/metric-benchmark/docs/stages.md)
focus on four executable stages: run mutants × eval tasks, compute
mutant scores, compute coverage, and correlate the score pairs. The
first execution script will be a basic local Harbor loop; NeMo Helix
support is planned afterward. The [architecture and both SVG
figures](https://github.com/NVIDIA-NeMo/eval-author/blob/docs/metric-benchmark-design/labs/metric-benchmark/docs/architecture.md)
explain the inputs, component boundaries, shared results directory, and
statistical comparison.

This is the documentation-only base of the stack. Implementation PRs #94
→ #105 → #106 → #95 → #96 → #97 → #99 inherit the overview and design
unchanged. Their detailed CLI guide lives separately in `docs/tools.md`.

Validation: the five files in this PR are Markdown/SVG only. Local links
and anchors, Markdown fences, headers, SVG XML, and whitespace checks
pass; the updated figure was rendered and visually inspected. Restacking
preserves all source and test files byte-for-byte. No live evaluations
or model calls were made.
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch from 5dde419 to c3d31df Compare October 23, 2026 14:42
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch from c3d31df to 2505187 Compare October 26, 2026 12:32
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch from 2505187 to a050306 Compare October 26, 2026 13:43
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch 2 times, most recently from 5e8016d to e5e1a94 Compare October 26, 2026 19:19
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch from e5e1a94 to 2d77adb Compare October 27, 2026 10:24
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch 2 times, most recently from 75f2728 to 47dc1fd Compare October 28, 2026 13:01
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch 2 times, most recently from 0eb4e76 to 11563e1 Compare October 29, 2026 12:58
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch from 11563e1 to 996d706 Compare October 29, 2026 14:27
@mstaats-nvidia
mstaats-nvidia removed this pull request from stack #107 October 29, 2026 14:28
@mstaats-nvidia
mstaats-nvidia added this pull request to stack #158 October 29, 2026 14:28
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch from 996d706 to e8ecaf7 Compare October 29, 2026 14:40
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch from e8ecaf7 to 597b8c9 Compare October 29, 2026 15:26
@mstaats-nvidia
mstaats-nvidia marked this pull request as ready for review October 29, 2026 15:33
@mstaats-nvidia
mstaats-nvidia requested a review from a team as a code owner October 29, 2026 15:33

@aleckhoury aleckhoury left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Correlation looks right.

  • Compared spearman with scipy.stats.spearmanr over 20,000 random cases (n = 0..12, both continuous and heavily tied inputs). Maximum absolute difference was 3.3e-16, and the two agreed on every case where no coefficient can be computed.
  • Matching on exact subset ID plus an identical Context is a safe join, because both inputs build Context with scoring.context().
  • missing_policy values and the default match config.py and the CLI.
  • The caveat that n = 2 always gives ±1 is documented.

At this head: 163 passed, 1 skipped.

@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch 2 times, most recently from 8e4ee0f to 64f897f Compare October 31, 2026 10:09
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch from 64f897f to c20650e Compare October 31, 2026 11:33
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch from c20650e to 19450eb Compare October 31, 2026 11:36
@mstaats-nvidia
mstaats-nvidia force-pushed the feat/metric-benchmark-correlation branch from 19450eb to 94daac9 Compare October 31, 2026 11:57
Signed-off-by: mstaats <mstaats@nvidia.com>
Signed-off-by: mstaats <mstaats@nvidia.com>
Move main and its argument parsing and JSON I/O imports into correlate.py.
Keep the correlation library focused on models and computation.

Signed-off-by: mstaats <mstaats@nvidia.com>
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.

3 participants