nemo_gym.rollout_compare.rows
nemo_gym.rollout_compare.rows
Read rollout rows and what each row says about itself.
Strict per-line JSONL parsing of the main file and the failures sidecar, with the last failure per attempt folded in as a masked row, and the per-row signals: the mask reason, the measured failure kind, the agent error and the strict numeric reward. summarize_side reduces one side’s rows for a task to a TaskSide.
Module Contents
Functions
API
The collector’s (task index, rollout index) identity of a row, or None when the row does not carry it.
A <name>_failures.jsonl record becomes a masked row with no reward.
The row’s reward as a float (None when absent; NaN/inf pass through for mask_reason to catch). Booleans
and strings are rejected rather than coerced: a "1.0" string means the producer is broken.
Best-effort task name for an error about one row, before the join key is known.
An agent-level error the row reports without being masked: the legacy agent’s error field or an
*error_type entry in the response metadata (e.g. Terminus’s terminus2_error_type).
The sidecar records that still stand: the collector writes one record per attempt and a retried rollout can end as a scored row in the main file, so only the last record per (task index, rollout index) counts and none whose rollout was scored after all. Records without the indices are kept as they are.
Read a rollouts JSONL plus, when present, its sibling <name>_failures.jsonl of masked failures. A failure
superseded by a later attempt (another sidecar record or a scored row) is left out.
Why a row does not count: mask_sample, no reward, or a NaN/infinite reward.
A failure_kind alone does not mask: with mask_sample false it labels a measured reward (e.g. the Harbor
server’s scored zero for a verifier timeout), which counts like any other reward; see measured_failure_kind.
The failure_kind of a row that still counts (not masked): a scored failure the report labels but does
not set aside, so a flip it causes is a real flip.