nemo_gym.rollouts.health.timeouts
nemo_gym.rollouts.health.timeouts
run.stats.timeouts: which rollouts ran out of time, and where their time went.
The section is a report. It changes no row, reward, score or health verdict, and
gym eval health-check recomputes it from the saved rows.
A rollout counts as timed out on one of two kinds of evidence:
typed: aTimeoutEventin the row’stimeoutslist, added by the component that enforces the limit. The operation records inng_trajectoryhave no field for it, so the event goes on the row.legacy: a field that a Gym component writes today when its own deadline fires. Each one is listed inLEGACY_TIMEOUT_SIGNALStogether with the component that writes it.
How long a rollout took never makes it count as timed out.
For the timed-out rollouts, the section also splits their time between the policy model, other model servers (a judge, a user simulator) and tools, and reports the policy’s serving speed. A run that times out because the deployment is too slow can then be retuned.
Module Contents
Classes
Functions
Data
API
Bases: NamedTuple
A row field that a Gym component sets when its own deadline fires; a dotted name reaches a nested field.
value is the field’s value on a timeout, or None for a flag that is set when nonzero. written_as
is the source text in producer that writes it; the tests check that it is still there.
What one rollout contributes to the section, read from its final record.
A busy time is None when the rollout does not measure it: a call without timing, or no tool timing.
active_s is how long a call of any kind ran, so a stretch in which two kinds overlap counts once.
Bases: BaseModel
How the elapsed time of the timed-out rollouts with captured model calls divides.
A share is that kind’s busy time over the rollouts’ summed elapsed time, or None when one of the
rollouts does not measure it. The kinds can overlap, as when a tool calls the policy model, so
untracked is the share in which no measured call ran, not one minus the shares.
Bases: NamedTuple
Bases: BaseModel
One confirmed firing of one time limit, in the timeouts list of the rollout’s row.
An event listed twice keeps its event_id, so one firing counts once.
Bases: BaseModel
The run.stats.timeouts section of the run health summary.
When a call ran. A call that reports only its duration has no start or end.
How long at least one of the calls was running, or None when a call has no timing.
Overlapping calls, such as parallel subagents, count once. A call that reports only its duration cannot be placed against other calls, so it is measured alone and leaves a union with other calls unknown.
The codes in a JSON list of gaps. A code that is not a string names no gap.
A JSON object, or an empty one in place of any other value.
A JSON number, or None in place of any other value. A boolean is not a number here.
The objects in a JSON list. Any other value reads as an empty list, and an item that is not an object is skipped.
Summed busy time over summed elapsed time, or None when a rollout does not measure it.
A rollout’s busy time is capped at its elapsed time, so clock skew between servers cannot push a share past what the rollout took.
The valid events in the row’s timeouts list, once per event_id, and how many entries were not
valid events. Only the row carries events: the trajectory’s operation records have no field for them, and
collection drops a trajectory that adds one.
End-to-end output speed of one call, so time in the server queue and in prefill counts too. A call that produced no output is measured at zero; one without a token count or a positive latency is not measured.
When the tool calls ran, or None when the trajectory does not measure it.
An empty tool_calls list is a measured zero. A missing or malformed list leaves the time unknown, and so
do a tool call without timing (see _busy_seconds) and a gap saying the tool calls were not observed:
tool_timing_unavailable, agent_artifact_unavailable or observation_capture_failed. An
agent_transcript_unavailable gap leaves an empty list unknown too, but not tools read from another source.
Why a rollout’s record counts as timed out, or None: the one classifier for this section and the run timing table. A typed event wins over a legacy signal; of several events, the first one names the limit.
The section’s numbers as flat exporter keys, such as health/timeouts/by_evidence/typed.
A null value is left out rather than exported as 0, so an unknown stays unknown on the tracking server.
Send the run’s timeouts section to the configured exporters (MLflow, W&B).
gym eval run and gym eval aggregate call this wherever they compute the run’s health. A failure,
in reading the section or in exporting it, is logged and never stops the run.
Everything the section needs from one rollout’s final record.
A malformed record never raises: a value of the wrong type reads as not measured, and the record checks report the record itself. A capture read only in part, or with a call record that is not an object, does not measure the model time, so its calls are left out.
The section for a run, from the timing of every rollout’s final record.
A limit or enforcer named only by attempts, the run’s earlier failed attempts, is counted 0, as the failure
export counts each failure class the sidecars name: a reopened tracking run keeps a counter’s last value until
it is sent.