nemo_gym.comparison.loading
nemo_gym.comparison.loading
Reading *_aggregate_metrics.json for gym eval compare, and picking which agent to compare.
Input file I/O for the compare feature lives here. The rollouts JSONL a user points at is
never opened: it is the run’s identity and the handle from which its _aggregate_metrics.json
sibling is derived. Aggregate files written before repeat-level statistics existed are enriched from
their already-recorded per-rollout summaries in memory.
Module Contents
Classes
Functions
Data
API
Which agent to read from each side for one comparison block.
One side of the comparison, narrowed to a single agent.
Add repeat metrics to one legacy aggregate entry.
How many repeats the run collected: the most any single task has.
expected_num_rollouts is per task, and a partially recovered run leaves some tasks short of
the rest, so the max is the run’s repeat count. repeat_level_metrics has exactly one entry
per repeat but is absent from single-repeat runs and from files written before it existed.
The file’s only agent, or an error asking which of several to use.
Narrow a parsed run file to one agent.
Resolve and parse one run’s *_aggregate_metrics.json.
Decide which agent to read from each side.
Precedence is most-specific-first: a per-side name beats agent_name, which beats the default
full join over agent names common to every run. Returns the selections, any warnings, and the
agents that were present but not compared (keyed by run label).
The *_aggregate_metrics.json to read: the explicit override, else the derived sibling.