nemo_gym.comparison.diff
nemo_gym.comparison.diff
Diffing two loaded runs: metric rows, difference confidence intervals, and per-task sample flips.
Module Contents
Functions
Data
API
Null out per-repeat reward lists on flips beyond the per-direction cap the markdown shows, so
compare_report.json doesn’t scale O(tasks x repeats) when most/all tasks move (continuous
mode).
Whether every observed reward on both sides is exactly 0 or 1.
Uses each task’s recorded min/max where available so a task whose repeats disagree (mean 0.5) is still recognised as binary. Falls back to mean only when a task has neither min nor max recorded.
Baseline order first (it is the reference), then anything only the candidates reported.
Finite numeric values for one metric, with one observation per repeat.
Warn when repeat estimates cover incomplete or unequal task samples.
Two-sided 95% Welch interval for candidate minus baseline.
Per-task movement between the two runs, joined on task index.
*_aggregate_metrics.json carries no task identity, so tasks are matched by
_ng_task_index alone — which assumes both runs used the same dataset, split, limit and
ordering.
One row per metric reported by any side, key metrics flagged.
key_metrics can rename or synthesize names that never appear in agent_metrics (e.g. an ASR
server’s corpus_wer@k=N -> wer), so rows are built from the union of both, taking the value
from key_metrics only when agent_metrics doesn’t already carry that name.
Build one agent’s comparison block: metric rows, flips, and anything worth flagging.