nemo_gym.core.failure_records
nemo_gym.core.failure_records
What a failure records: the events Gym servers observe, the report that forwards them, and the episode failure.
Failure kinds live in nemo_gym.core.failure_kinds; nemo_gym.core.failure_transport carries reports over HTTP.
Module Contents
Classes
Functions
Data
API
Bases: BaseModel
Describe a failure using the same fields on the wire and in saved records.
An environment server returns this envelope for one failed episode attempt. Collection uses its
existing terminal flag and retry budget; failure_kind describes the failure without deciding
terminality. Kind and stage are optional because a collector observing a lost reply may not know them.
The attempt’s FailureReport travels beside this envelope (BaseEpisodeResponse.failure_report), so
records that nest EpisodeFailure keep their saved format.
Bases: enum.Enum
The places a failure is observed, as the failure-boundaries RFC names them.
Each one reports what it observed; none of them chooses retries, terminality or scores.
Bases: BaseModel
One observed failure: who observed it, what failed, and which failure caused it.
This is the validated wire projection of a NgFailureEvent, whose fields and origin identity live on
the exception itself. cause_id names another Gym failure in the same map. Foreign SDK facts live in
foreign_error; they are not boundary-less Gym events. Canonical projections validate kind and boundary
on both failed and recovered reports, independently of the legacy outcome envelope. details uses
the schema selected by boundary; common facts stay on this event, without a second copy in details.
Readers count each failure once by event_id. Outcome policy stays with EpisodeFailure.terminal and
the collector’s existing rules.
Bases: BaseModel
The failures one reply forwards: its own failure (failure_id, absent on success) and every failure
observed while serving the request, each with its explicit causes.
omitted says that a report on the way here was too large to send, so events are missing.
nemo_gym.core.failure_transport carries it in one HTTP header; Collection saves it beside the outcome.
This report with other’s events added; failure_id stays this report’s.
An event id names one immutable record, so the first copy of an id is kept.
Bases: BaseModel
Observed model-request facts, independent of retry or scoring policy.
Bases: BaseModel
Observed sandbox facts; missing evidence stays absent, with no inferred cause or policy.
A last execution ID does not establish causation. Preserve provider reason codes as reported; use only reported command exit codes, not synthesized fallback codes.
Bases: BaseModel
Diagnostics an adapter selected from a third-party SDK error before it raised its own failure.
The adapter chooses the message (for example the SDK’s message field), because str() of an SDK
error can contain request data. The SDK object, its request and its response body are never stored.
Check that events is keyed by event id and that every cause_id resolves in it without a cycle.