nemo_gym.rollout_outcomes

View as Markdown

Shared failure record for evaluation collectors and other run owners.

Module Contents

Classes

NameDescription
RolloutFailureAssociate one observed failure with a run and an episode attempt.

API

class nemo_gym.rollout_outcomes.RolloutFailure()

Bases: BaseModel

Associate one observed failure with a run and an episode attempt.

source identifies who reported the failure. delivery describes the collector’s evidence about delivery to the Environment Server: not_sent requires evidence that the request was not sent, possibly_delivered covers an uncertain outcome, and delivered means delivery was established. It does not promise exactly-once execution or authorize transport replay. A failure reported by the Environment Server requires delivery="delivered".

The nested failure uses the wire contract, not a second set of reason/stage fields. Protocol-specific diagnostics, partial responses, and training data belong outside this record. No reward is inferred from a failure. Persistence, conversion from legacy markers, and retry budgets belong to the caller.

schema_version identifies the entire saved record, including nested contracts. Missing versions are treated as version 1 for pre-version records. Changes that older readers cannot parse (including added fields) require a version bump. Readers reject unsupported versions and unknown fields; callers must report an incompatible record or explicitly migrate it, never silently drop fields or reinterpret it as a completed rollout.

delivery
Literal['not_sent', 'possibly_delivered', 'delivered']
episode_id
EpisodeId
exception_type
str | None = Field(default=None, max_length=2000)
failure
EpisodeFailure
http_status
int | None = Field(default=None, ge=100, le=599)
model_config
= ConfigDict(extra='forbid', frozen=True)
run_id
str = Field(min_length=1)
schema_version
Literal[1] = 1
source
Literal['environment', 'collector']
nemo_gym.rollout_outcomes.RolloutFailure.validate_delivery() -> typing_extensions.Self

Require established delivery for failures reported by the environment.