You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 288d78b
Browse filesBrowse the repository at this point in the historyBrowse files
TaskFailure exposes evaluation_side and delivery, and the docs say that domain is a layer, not a fault class, and that terminal is not a retry hint. A masked rollout keeps the reward the verifier returned and the docs tell a caller that computes scores to leave masked rollouts out. Tests send a refused and a dropped connection through run_outcomes. The in-process API warns once per process through experimental(once=True), which leaves the other experimental commands warning on every call. The docs, the pins and the module docstring are corrected and reflowed.
Signed-off-by: Ingo Guehring <[email protected]>
Copy file name to clipboardExpand all lines: fern/versions/latest/pages/api-reference/index.mdx
+22-10Lines changed: 22 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,25 +116,37 @@ Import everything from `nemo_gym.environment`: `plan_benchmark`, `serve_benchmar
116
116
`RolloutOutcome`, `TaskFailure` and `EvalPlan`. The error type is `nemo_gym.config.ConfigError`.
117
117
118
118
This API is experimental: signatures, result fields and behavior may change or be removed without a deprecation
119
-
period. `plan_benchmark`, `serve_benchmark`and `TaskRunner` warn on stderr when they are used. A test pins the current
120
-
names and fields so that a change is deliberate.
119
+
period. `plan_benchmark`, `serve_benchmark`, `TaskRunner`and `run_task` warn on stderr the first time they are used
120
+
in a process. A test pins the current names and fields so that a change is deliberate.
121
121
122
-
`run_task` runs one rollout of a task and returns its typed `RolloutOutcome`: the `reward` (None when none
123
-
exists, as for a failed `/run`), a `TaskFailure` when a failure was reported, whether it was `masked`, and the `prompt` and
124
-
`output` as JSON text for display. A failed `/run` (a client error, a bad JSON body, a timeout or an unusable reply) does not raise: the outcome has a `failure` and no reward. Any other exception, such as a programming error, and cancellation propagate.
122
+
`run_task` runs one rollout of a task and returns its typed `RolloutOutcome`:
123
+
124
+
-`reward` is None when no reward exists, as for a failed `/run`.
125
+
-`failure` is a `TaskFailure` when a failure was reported.
126
+
-`masked` is True when the verifier says the reward is not a valid measurement of the evaluated system, such as a
127
+
lost session (it reports a reward of 0 and masks it). The outcome keeps that reward, so a caller that computes scores
128
+
must leave masked rollouts out. A failed `/run` has no sample, so its `masked` is False and its `reward` is None.
129
+
-`prompt` and `output` are `responses_create_params.input` and `response.output` as JSON text, for display. They are
130
+
None for a result without that shape, such as a native episode result.
131
+
132
+
A failed `/run` (a client error, a bad JSON body, a timeout or an unusable reply) does not raise: the outcome has a
133
+
`failure` and no reward. A connection that was refused is resent for a minute and one that dropped is sent twice, as
134
+
`gym eval run` does. Any other exception, such as a programming error, and cancellation propagate.
125
135
126
136
A failure reports what Gym observed and leaves the decision to you:
127
137
128
138
| Field | Meaning |
129
139
| --- | --- |
130
-
|`kind`, `domain`| Gym's failure kind and, derived from it, the layer that observed it (the part of the kind before the first `_` or `:`, such as `agent`, `judge`, `session` or `provider`). When the reporter named no cause, the kind is `environment_server_failed` or `agent_request_failed`. |
140
+
|`kind`| Gym's failure kind. The vocabulary is in `nemo_gym/core/failure_kinds.py`; a `<server>:<kind>` kind is an environment's own. When the reporter named no cause, it is `environment_server_failed` or `agent_request_failed`. |
141
+
|`domain`| The layer that observed the failure: the part of the kind before the first `_` or `:`, such as `agent`, `judge`, `session` or `provider`. It is not a fault class: `agent_timeout` and `agent_run_error` are both in `agent`. |
142
+
|`evaluation_side`| True for an evaluation-side fault, False for the model's own outcome (such as `model_request_error` or `agent_timeout`), None for a kind outside Gym's vocabulary. |
131
143
|`source`| Who reported it: `environment` or `collector`. |
132
-
|`stage`, `terminal`| Where in the episode it happened, when known, and the reporter's statement that the episode must not be attempted again. |
144
+
|`delivery`| Whether the `/run` request reached the agent: `not_sent` (every connection was refused, so resending cannot start a second episode), `possibly_delivered` or `delivered`. Use it for a retry decision. |
145
+
|`stage`, `terminal`| Where in the episode it happened, when known, and the reporter's statement that the episode must not be attempted again. `terminal=False` is not a retry hint. |
Group failures by `domain` and a new kind under an existing domain needs no change from you.
136
-
137
-
`RolloutOutcome.raw` holds Gym's raw `/run` response (the failure record for a failed `/run`). Its keys are not part of the contract: depend on the other fields, and use `raw` for debugging.
148
+
`RolloutOutcome.raw` holds Gym's raw `/run` response (the failure record for a failed `/run`). Its keys are not part
149
+
of the contract: depend on the other fields, and use `raw` for debugging.
0 commit comments