Skip to navigation

nemo_gym.rollouts.omitted_rollouts

View as Markdown

Failures-sidecar rows for rollouts that produced no result.

An attempt the agent reports as kill_shaped and a row dispatch_budget_s never started both carry _ng_no_persist: there is no result to score or count as an attempt. By default rollout collection writes nothing for them, so their absence is the only evidence. With record_omitted_rollouts it writes the row built here to the failures sidecar instead, marked _ng_omitted_rollout. No reader counts that row as a failure or an attempt, so scoring and the resume attempt count are unchanged and resume still runs the rollout. When readers pick a rollout’s latest attempt, an interrupted one counts and hides older failures; one never started is skipped.

A failed agent /run that ends the run because route_failures_to_sidecar is off gets the same row, whatever record_omitted_rollouts says: its reply was lost, so the rollout produced no result. That row also carries _ng_unrouted_run_error: it is evidence, not a new execution, so readers skip it before they pick the latest attempt. An older failure of the rollout still stands, and a later attempt still replaces it.

Rollout collection with a run manifest writes this row only for a row never started: it saves an interrupted attempt as a kill_shaped failure in the run history, so a second row would record the interruption twice.

Module Contents

Functions

NameDescription
omitted_rollout_recordThe failures-sidecar row for a result marked _ng_no_persist.

Data

_FAILURE_MESSAGE_KEY

API

nemo_gym.rollouts.omitted_rollouts.omitted_rollout_record(
result: typing.Mapping[str, typing.Any]
) -> typing.Dict[str, typing.Any]

The failures-sidecar row for a result marked _ng_no_persist.

The row is a copy of the result, so the rollout’s identity, its agent and whatever diagnostics the agent returned stay with it. The failure class the result carries is kept; a result without one is cancelled when the dispatch budget never started it and kill_shaped otherwise. _ng_failure_message keeps the reason the result gave, else says that no result was produced.

nemo_gym.rollouts.omitted_rollouts._FAILURE_MESSAGE_KEY = '_ng_failure_message'