> This page is for version 0.3.0.
> For other versions, use one of these documentation indexes:
> - Main (default): https://docs.nvidia.com/nemo/gym/main/llms.txt
> - 0.7.0: https://docs.nvidia.com/nemo/gym/v0.7.0/llms.txt
> - 0.6.0: https://docs.nvidia.com/nemo/gym/v0.6.0/llms.txt
> - 0.5.1: https://docs.nvidia.com/nemo/gym/v0.5.1/llms.txt
> - 0.5.0: https://docs.nvidia.com/nemo/gym/v0.5.0/llms.txt
> - 0.4.0: https://docs.nvidia.com/nemo/gym/v0.4.0/llms.txt
> - 0.3.0: https://docs.nvidia.com/nemo/gym/v0.3.0/llms.txt
> - 0.2.1: https://docs.nvidia.com/nemo/gym/v0.2.1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/gym/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/gym/_mcp/server.

# nemo_gym.core.failure_kinds

Shared failure names and episode execution stages.

Gym describes failures with free text and component-local labels, so the same failure
arrives at a collector, a log line and a metric under three different names and cannot be
grouped. This module holds the one vocabulary those producers share.

A name says *what kind of thing went wrong* and nothing else. Whether to retry, whether
the request may be replayed, whether a completed result should be masked, and what to tell
a person are all properties of the occurrence, not of the name — they live on the failure
record, on the verify response, and in `failure_reason` respectively. Keeping them out is
deliberate: metadata attached to a name goes stale the moment one caller wants to retry
what another caller does not.

Names are low cardinality on purpose. They are safe as a metric label or a span dimension;
`failure_reason` never is, because it carries occurrence detail and can be unbounded.

Classification configuration uses Pydantic, but this module imports no server code.

## Module Contents

### Classes

| Name                                                                                      | Description                                                                              |
| ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| [`FailureClass`](#nemo_gym-core-failure_kinds-FailureClass)                               | Configurable responsibility for reporting; no class implies an action or health verdict. |
| [`FailureClassificationConfig`](#nemo_gym-core-failure_kinds-FailureClassificationConfig) | One shared stage/kind mapping and explicit HTTP evidence rules.                          |
| [`StageClassificationConfig`](#nemo_gym-core-failure_kinds-StageClassificationConfig)     | Classification overrides for an established originating stage.                           |

### Functions

| Name                                                                                            | Description                                                                                           |
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [`_default_classification_config`](#nemo_gym-core-failure_kinds-_default_classification_config) | Private read-only default for classification; caller-created configs remain independent.              |
| [`_default_stage_classification`](#nemo_gym-core-failure_kinds-_default_stage_classification)   | -                                                                                                     |
| [`_merge_stage_overrides`](#nemo_gym-core-failure_kinds-_merge_stage_overrides)                 | Merge partial stage configurations before their concrete models validate them.                        |
| [`_validate_classification_kinds`](#nemo_gym-core-failure_kinds-_validate_classification_kinds) | -                                                                                                     |
| [`classify_failure`](#nemo_gym-core-failure_kinds-classify_failure)                             | Interpret only supplied evidence; never walk causes or mutate the observed kind/stage.                |
| [`is_evaluation_side`](#nemo_gym-core-failure_kinds-is_evaluation_side)                         | Whether a registered kind has a shared evaluation-side default without extra context.                 |
| [`is_gate_derived`](#nemo_gym-core-failure_kinds-is_gate_derived)                               | Whether `name` is a class the acceptance gate derives from saved rows (`GATE_DERIVED_KINDS`).         |
| [`is_namespaced`](#nemo_gym-core-failure_kinds-is_namespaced)                                   | Whether `name` is an environment's own `&lt;server&gt;:&lt;kind&gt;` extension.                       |
| [`is_registered`](#nemo_gym-core-failure_kinds-is_registered)                                   | Whether `name` is part of the shared vocabulary.                                                      |
| [`is_server_failure`](#nemo_gym-core-failure_kinds-is_server_failure)                           | Server subcategory for an already established evaluation failure, never a class decision.             |
| [`is_server_status`](#nemo_gym-core-failure_kinds-is_server_status)                             | Whether a recorded HTTP status is an integer in the 5xx class.                                        |
| [`quota_reset_text`](#nemo_gym-core-failure_kinds-quota_reset_text)                             | The UTC time a `provider_quota_exhausted` reason names (`resets at YYYY-MM-DD HH:MM UTC`), else None. |
| [`quota_reset_unix`](#nemo_gym-core-failure_kinds-quota_reset_unix)                             | `quota_reset_text` as a unix time, else None.                                                         |
| [`reporting_failure_kind`](#nemo_gym-core-failure_kinds-reporting_failure_kind)                 | Project observed HTTP evidence to a reporting label without changing the event.                       |
| [`require_failure_kind`](#nemo_gym-core-failure_kinds-require_failure_kind)                     | Validate a canonical event kind; legacy outcome envelopes keep their migration validator.             |
| [`validate_failure_kind`](#nemo_gym-core-failure_kinds-validate_failure_kind)                   | Return `name` unchanged, warning once per unregistered value.                                         |

### Data

[`AGENT_COMMAND_NOT_ALLOWED`](#nemo_gym-core-failure_kinds-AGENT_COMMAND_NOT_ALLOWED)

[`AGENT_INVALID_OUTPUT`](#nemo_gym-core-failure_kinds-AGENT_INVALID_OUTPUT)

[`AGENT_LIMIT`](#nemo_gym-core-failure_kinds-AGENT_LIMIT)

[`AGENT_REQUEST_FAILED`](#nemo_gym-core-failure_kinds-AGENT_REQUEST_FAILED)

[`AGENT_ROUTE_FAILED`](#nemo_gym-core-failure_kinds-AGENT_ROUTE_FAILED)

[`AGENT_RUN_ERROR`](#nemo_gym-core-failure_kinds-AGENT_RUN_ERROR)

[`AGENT_TIMEOUT`](#nemo_gym-core-failure_kinds-AGENT_TIMEOUT)

[`AGENT_TIMEOUT_INFRASTRUCTURE`](#nemo_gym-core-failure_kinds-AGENT_TIMEOUT_INFRASTRUCTURE)

[`CANCELLED`](#nemo_gym-core-failure_kinds-CANCELLED)

[`COHORT_INCOMPLETE`](#nemo_gym-core-failure_kinds-COHORT_INCOMPLETE)

[`COLLECTION_DISPATCH_FAILED`](#nemo_gym-core-failure_kinds-COLLECTION_DISPATCH_FAILED)

[`COLLECTION_RESUME_REFUSED`](#nemo_gym-core-failure_kinds-COLLECTION_RESUME_REFUSED)

[`DRIVER_INSTALL_FAILED`](#nemo_gym-core-failure_kinds-DRIVER_INSTALL_FAILED)

[`EMPTY_ANSWER`](#nemo_gym-core-failure_kinds-EMPTY_ANSWER)

[`ENVIRONMENT_PREPARE_FAILED`](#nemo_gym-core-failure_kinds-ENVIRONMENT_PREPARE_FAILED)

[`ENVIRONMENT_PROTOCOL_VIOLATION`](#nemo_gym-core-failure_kinds-ENVIRONMENT_PROTOCOL_VIOLATION)

[`ENVIRONMENT_SERVER_FAILED`](#nemo_gym-core-failure_kinds-ENVIRONMENT_SERVER_FAILED)

[`EPISODE_FAILED`](#nemo_gym-core-failure_kinds-EPISODE_FAILED)

[`FAILURE_KINDS`](#nemo_gym-core-failure_kinds-FAILURE_KINDS)

[`FailureStage`](#nemo_gym-core-failure_kinds-FailureStage)

[`GATE_DERIVED_KINDS`](#nemo_gym-core-failure_kinds-GATE_DERIVED_KINDS)

[`GRADING_WITHOUT_VERDICT`](#nemo_gym-core-failure_kinds-GRADING_WITHOUT_VERDICT)

[`HARBOR_FAILED`](#nemo_gym-core-failure_kinds-HARBOR_FAILED)

[`HARNESS_TERMINATION_UNCONFIRMED`](#nemo_gym-core-failure_kinds-HARNESS_TERMINATION_UNCONFIRMED)

[`INFRASTRUCTURE_ERROR`](#nemo_gym-core-failure_kinds-INFRASTRUCTURE_ERROR)

[`INVALID_OUTPUT_BUDGET`](#nemo_gym-core-failure_kinds-INVALID_OUTPUT_BUDGET)

[`INVALID_REQUEST_PARAMETER`](#nemo_gym-core-failure_kinds-INVALID_REQUEST_PARAMETER)

[`JUDGE_FAILED`](#nemo_gym-core-failure_kinds-JUDGE_FAILED)

[`JUDGE_FAILURE_KINDS`](#nemo_gym-core-failure_kinds-JUDGE_FAILURE_KINDS)

[`JUDGE_SKIPPED`](#nemo_gym-core-failure_kinds-JUDGE_SKIPPED)

[`JUDGE_UNPARSEABLE`](#nemo_gym-core-failure_kinds-JUDGE_UNPARSEABLE)

[`KILL_SHAPED`](#nemo_gym-core-failure_kinds-KILL_SHAPED)

[`MALFORMED_ANSWER`](#nemo_gym-core-failure_kinds-MALFORMED_ANSWER)

[`MODEL_CONTEXT_LIMIT`](#nemo_gym-core-failure_kinds-MODEL_CONTEXT_LIMIT)

[`MODEL_FAULT_KINDS`](#nemo_gym-core-failure_kinds-MODEL_FAULT_KINDS)

[`MODEL_POLICY_RESPONSE_TIMEOUT`](#nemo_gym-core-failure_kinds-MODEL_POLICY_RESPONSE_TIMEOUT)

[`MODEL_REQUEST_ERROR`](#nemo_gym-core-failure_kinds-MODEL_REQUEST_ERROR)

[`MODEL_SERVER_ERROR`](#nemo_gym-core-failure_kinds-MODEL_SERVER_ERROR)

[`MODEL_TRANSPORT_ERROR`](#nemo_gym-core-failure_kinds-MODEL_TRANSPORT_ERROR)

[`NON_POLICY_MODEL_REJECTION`](#nemo_gym-core-failure_kinds-NON_POLICY_MODEL_REJECTION)

[`PERSISTENCE_FAILED`](#nemo_gym-core-failure_kinds-PERSISTENCE_FAILED)

[`PROVIDER_COMMAND_OUTCOME_UNKNOWN`](#nemo_gym-core-failure_kinds-PROVIDER_COMMAND_OUTCOME_UNKNOWN)

[`PROVIDER_COMMAND_TIMEOUT`](#nemo_gym-core-failure_kinds-PROVIDER_COMMAND_TIMEOUT)

[`PROVIDER_CREATE_PENDING`](#nemo_gym-core-failure_kinds-PROVIDER_CREATE_PENDING)

[`PROVIDER_CREATE_TIMEOUT`](#nemo_gym-core-failure_kinds-PROVIDER_CREATE_TIMEOUT)

[`PROVIDER_CREDENTIALS_REJECTED`](#nemo_gym-core-failure_kinds-PROVIDER_CREDENTIALS_REJECTED)

[`PROVIDER_FAILURE_KINDS`](#nemo_gym-core-failure_kinds-PROVIDER_FAILURE_KINDS)

[`PROVIDER_INTERNAL_ERROR`](#nemo_gym-core-failure_kinds-PROVIDER_INTERNAL_ERROR)

[`PROVIDER_IO_TIMEOUT`](#nemo_gym-core-failure_kinds-PROVIDER_IO_TIMEOUT)

[`PROVIDER_NOT_READY`](#nemo_gym-core-failure_kinds-PROVIDER_NOT_READY)

[`PROVIDER_OOM_KILLED`](#nemo_gym-core-failure_kinds-PROVIDER_OOM_KILLED)

[`PROVIDER_PROTOCOL_ERROR`](#nemo_gym-core-failure_kinds-PROVIDER_PROTOCOL_ERROR)

[`PROVIDER_PTY_BUSY`](#nemo_gym-core-failure_kinds-PROVIDER_PTY_BUSY)

[`PROVIDER_PTY_UNAVAILABLE`](#nemo_gym-core-failure_kinds-PROVIDER_PTY_UNAVAILABLE)

[`PROVIDER_QUOTA_EXHAUSTED`](#nemo_gym-core-failure_kinds-PROVIDER_QUOTA_EXHAUSTED)

[`PROVIDER_REQUEST_FAILED`](#nemo_gym-core-failure_kinds-PROVIDER_REQUEST_FAILED)

[`PROVIDER_SETUP_FAILED`](#nemo_gym-core-failure_kinds-PROVIDER_SETUP_FAILED)

[`PROVIDER_STATUS_UNAVAILABLE`](#nemo_gym-core-failure_kinds-PROVIDER_STATUS_UNAVAILABLE)

[`PROVIDER_UNAVAILABLE`](#nemo_gym-core-failure_kinds-PROVIDER_UNAVAILABLE)

[`QUOTA_RESET_REGEX`](#nemo_gym-core-failure_kinds-QUOTA_RESET_REGEX)

[`ROLLOUT_ALLOCATION_ENDED`](#nemo_gym-core-failure_kinds-ROLLOUT_ALLOCATION_ENDED)

[`SERVER_FAULT_KINDS`](#nemo_gym-core-failure_kinds-SERVER_FAULT_KINDS)

[`SERVER_SPINUP_TIMEOUT`](#nemo_gym-core-failure_kinds-SERVER_SPINUP_TIMEOUT)

[`SERVER_START_FAILED`](#nemo_gym-core-failure_kinds-SERVER_START_FAILED)

[`SESSION_EXPIRED`](#nemo_gym-core-failure_kinds-SESSION_EXPIRED)

[`SESSION_LOST`](#nemo_gym-core-failure_kinds-SESSION_LOST)

[`SESSION_RELEASE_FAILED`](#nemo_gym-core-failure_kinds-SESSION_RELEASE_FAILED)

[`SHUTDOWN`](#nemo_gym-core-failure_kinds-SHUTDOWN)

[`TRANSPORT_LOCAL_RESOURCE`](#nemo_gym-core-failure_kinds-TRANSPORT_LOCAL_RESOURCE)

[`TRANSPORT_PEER_DROP`](#nemo_gym-core-failure_kinds-TRANSPORT_PEER_DROP)

[`TRANSPORT_TIMEOUT`](#nemo_gym-core-failure_kinds-TRANSPORT_TIMEOUT)

[`TRANSPORT_UNREACHABLE`](#nemo_gym-core-failure_kinds-TRANSPORT_UNREACHABLE)

[`TRUNCATED_ANSWER`](#nemo_gym-core-failure_kinds-TRUNCATED_ANSWER)

[`VERIFIER_ERROR`](#nemo_gym-core-failure_kinds-VERIFIER_ERROR)

[`_DEFAULT_CLASSIFICATION`](#nemo_gym-core-failure_kinds-_DEFAULT_CLASSIFICATION)

[`_NAMESPACED_PATTERN`](#nemo_gym-core-failure_kinds-_NAMESPACED_PATTERN)

[`_NAME_PATTERN`](#nemo_gym-core-failure_kinds-_NAME_PATTERN)

[`_QUOTA_RESET_PATTERN`](#nemo_gym-core-failure_kinds-_QUOTA_RESET_PATTERN)

[`_WARNED_UNKNOWN`](#nemo_gym-core-failure_kinds-_WARNED_UNKNOWN)

[`logger`](#nemo_gym-core-failure_kinds-logger)

### API

```python
class nemo_gym.core.failure_kinds.FailureClass
```

**Bases:** `enum.Enum`

Configurable responsibility for reporting; no class implies an action or health verdict.

**`EVALUATION`** `= 'evaluation'`

---

**`MODEL`** `= 'model'`

---

**`UNKNOWN`** `= 'unknown'`

---

```python
class nemo_gym.core.failure_kinds.FailureClassificationConfig()
```

**Bases:** `BaseModel`

One shared stage/kind mapping and explicit HTTP evidence rules.

Class overrides by HTTP status take precedence, followed by stage kind/default,
HTTP-derived evidence, kind, and the unknown fallback. Stage rules require context
admitted by the caller; a provider cannot establish agent ownership on its own.
Partial overrides retain unspecified defaults. HTTP-derived labels are reporting
projections only: never write them back into observed failure events.

**`by_failure_kind`** `dict[str, FailureClass]`

---

**`by_stage`** `dict[FailureStage, StageClassificationConfig]`

---

**`by_status_code`** `dict[Annotated[int, Field(ge=400, le=599)], FailureClass] = Field(default_factory=dict)`

---

**`default_class`** `FailureClass = FailureClass.UNKNOWN`

---

**`model_config`** `= ConfigDict(extra='forbid')`

---

**`non_policy_reporting_kind_by_status_code`** `dict[Annotated[int, Field(ge=400, le=599)], str | None]`

---

**`reporting_kind_by_status_code`** `dict[Annotated[int, Field(ge=400, le=599)], str | None]`

---

```python
nemo_gym.core.failure_kinds.FailureClassificationConfig.merge_rules(
    value: dict,
    info: pydantic.ValidationInfo
) -> dict
```

classmethod

```python
nemo_gym.core.failure_kinds.FailureClassificationConfig.merge_stages(
    value: object
) -> object
```

classmethod

```python
nemo_gym.core.failure_kinds.FailureClassificationConfig.validate_kinds(
    value: dict[str, nemo_gym.core.failure_kinds.FailureClass]
) -> dict[str, nemo_gym.core.failure_kinds.FailureClass]
```

classmethod

```python
nemo_gym.core.failure_kinds.FailureClassificationConfig.validate_reporting_kinds(
    value: dict[int, str | None]
) -> dict[int, str | None]
```

classmethod

```python
class nemo_gym.core.failure_kinds.StageClassificationConfig()
```

**Bases:** `BaseModel`

Classification overrides for an established originating stage.

**`by_failure_kind`** `dict[str, FailureClass] = Field(default_factory=dict)`

---

**`default_class`** `FailureClass | None = None`

---

**`model_config`** `= ConfigDict(extra='forbid')`

---

```python
nemo_gym.core.failure_kinds.StageClassificationConfig.validate_kinds(
    value: dict[str, nemo_gym.core.failure_kinds.FailureClass]
) -> dict[str, nemo_gym.core.failure_kinds.FailureClass]
```

classmethod

```python
nemo_gym.core.failure_kinds._default_classification_config() -> nemo_gym.core.failure_kinds.FailureClassificationConfig
```

Private read-only default for classification; caller-created configs remain independent.

```python
nemo_gym.core.failure_kinds._default_stage_classification() -> dict[nemo_gym.core.failure_kinds.FailureStage, nemo_gym.core.failure_kinds.StageClassificationConfig]
```

```python
nemo_gym.core.failure_kinds._merge_stage_overrides(
    defaults: dict[str, pydantic.BaseModel],
    value: object,
    dict_fields: tuple[str, ...]
) -> object
```

Merge partial stage configurations before their concrete models validate them.

```python
nemo_gym.core.failure_kinds._validate_classification_kinds(
    rules: dict[str, nemo_gym.core.failure_kinds._validate_classification_kinds[T]]
) -> dict[str, nemo_gym.core.failure_kinds._validate_classification_kinds[T]]
```

```python
nemo_gym.core.failure_kinds.classify_failure(
    failure_kind: str | None,
    stage: nemo_gym.core.failure_kinds.FailureStage | None = None,
    http_status: object = None,
    policy: bool = True,
    config: nemo_gym.core.failure_kinds.FailureClassificationConfig | None = None
) -> nemo_gym.core.failure_kinds.FailureClass
```

Interpret only supplied evidence; never walk causes or mutate the observed kind/stage.

```python
nemo_gym.core.failure_kinds.is_evaluation_side(
    name: str,
    config: nemo_gym.core.failure_kinds.FailureClassificationConfig | None = None
) -> bool
```

Whether a registered kind has a shared evaluation-side default without extra context.

```python
nemo_gym.core.failure_kinds.is_gate_derived(
    name: str
) -> bool
```

Whether `name` is a class the acceptance gate derives from saved rows (`GATE_DERIVED_KINDS`).

```python
nemo_gym.core.failure_kinds.is_namespaced(
    name: str
) -> bool
```

Whether `name` is an environment's own `<server>:<kind>` extension.

```python
nemo_gym.core.failure_kinds.is_registered(
    name: str
) -> bool
```

Whether `name` is part of the shared vocabulary.

```python
nemo_gym.core.failure_kinds.is_server_failure(
    kind: str | None,
    config: nemo_gym.core.failure_kinds.FailureClassificationConfig | None = None
) -> bool
```

Server subcategory for an already established evaluation failure, never a class decision.

Callers check the applied class first. In particular, OOM can be model-side or
evaluation-side depending on its originating stage and admitted ownership.

```python
nemo_gym.core.failure_kinds.is_server_status(
    status: object
) -> bool
```

Whether a recorded HTTP status is an integer in the 5xx class.

```python
nemo_gym.core.failure_kinds.quota_reset_text(
    reason: object
) -> str | None
```

The UTC time a `provider_quota_exhausted` reason names (`resets at YYYY-MM-DD HH:MM UTC`), else None.

```python
nemo_gym.core.failure_kinds.quota_reset_unix(
    reason: object
) -> float | None
```

`quota_reset_text` as a unix time, else None.

```python
nemo_gym.core.failure_kinds.reporting_failure_kind(
    kind: str | None,
    http_status: object,
    policy: bool = True,
    config: nemo_gym.core.failure_kinds.FailureClassificationConfig | None = None
) -> str | None
```

Project observed HTTP evidence to a reporting label without changing the event.

```python
nemo_gym.core.failure_kinds.require_failure_kind(
    name: str | None
) -> str
```

Validate a canonical event kind; legacy outcome envelopes keep their migration validator.

A gate-derived class (`GATE_DERIVED_KINDS`) is no producer's kind and is refused like any unregistered name.

```python
nemo_gym.core.failure_kinds.validate_failure_kind(
    name: str | None
) -> str | None
```

Return `name` unchanged, warning once per unregistered value.

Producers call this at their boundary. It warns rather than raises so a component that
still emits an old label stays visible during migration — rejecting it outright would
replace an observable wrong name with an invisible dropped failure, which is worse than
the problem this vocabulary exists to fix.

```python
nemo_gym.core.failure_kinds.AGENT_COMMAND_NOT_ALLOWED = 'agent_command_not_allowed'
```

```python
nemo_gym.core.failure_kinds.AGENT_INVALID_OUTPUT = 'agent_invalid_output'
```

```python
nemo_gym.core.failure_kinds.AGENT_LIMIT = 'agent_limit'
```

```python
nemo_gym.core.failure_kinds.AGENT_REQUEST_FAILED = 'agent_request_failed'
```

```python
nemo_gym.core.failure_kinds.AGENT_ROUTE_FAILED = 'agent_route_failed'
```

```python
nemo_gym.core.failure_kinds.AGENT_RUN_ERROR = 'agent_run_error'
```

```python
nemo_gym.core.failure_kinds.AGENT_TIMEOUT = 'agent_timeout'
```

```python
nemo_gym.core.failure_kinds.AGENT_TIMEOUT_INFRASTRUCTURE = 'agent_timeout_infrastructure'
```

```python
nemo_gym.core.failure_kinds.CANCELLED = 'cancelled'
```

```python
nemo_gym.core.failure_kinds.COHORT_INCOMPLETE = 'cohort_incomplete'
```

```python
nemo_gym.core.failure_kinds.COLLECTION_DISPATCH_FAILED = 'collection_dispatch_failed'
```

```python
nemo_gym.core.failure_kinds.COLLECTION_RESUME_REFUSED = 'collection_resume_refused'
```

```python
nemo_gym.core.failure_kinds.DRIVER_INSTALL_FAILED = 'driver_install_failed'
```

```python
nemo_gym.core.failure_kinds.EMPTY_ANSWER = 'empty_answer'
```

```python
nemo_gym.core.failure_kinds.ENVIRONMENT_PREPARE_FAILED = 'environment_prepare_failed'
```

```python
nemo_gym.core.failure_kinds.ENVIRONMENT_PROTOCOL_VIOLATION = 'environment_protocol_violation'
```

```python
nemo_gym.core.failure_kinds.ENVIRONMENT_SERVER_FAILED = 'environment_server_failed'
```

```python
nemo_gym.core.failure_kinds.EPISODE_FAILED = 'environment_episode_failed'
```

```python
nemo_gym.core.failure_kinds.FAILURE_KINDS: frozenset[str] = frozenset({TRANSPORT_UNREACHABLE, TRANSPORT_PEER_DROP, TRANSPORT_TIMEOUT, TRANSP...
```

```python
nemo_gym.core.failure_kinds.FailureStage = Literal['admission', 'seed', 'agent', 'verification', 'cleanup']
```

```python
nemo_gym.core.failure_kinds.GATE_DERIVED_KINDS: frozenset[str] = frozenset({GRADING_WITHOUT_VERDICT, TRUNCATED_ANSWER, EMPTY_ANSWER, MALFORMED_AN...
```

```python
nemo_gym.core.failure_kinds.GRADING_WITHOUT_VERDICT = 'grading_without_verdict'
```

```python
nemo_gym.core.failure_kinds.HARBOR_FAILED = 'harbor_failed'
```

```python
nemo_gym.core.failure_kinds.HARNESS_TERMINATION_UNCONFIRMED = 'harness_termination_unconfirmed'
```

```python
nemo_gym.core.failure_kinds.INFRASTRUCTURE_ERROR = 'infrastructure_error'
```

```python
nemo_gym.core.failure_kinds.INVALID_OUTPUT_BUDGET = 'invalid_output_budget'
```

```python
nemo_gym.core.failure_kinds.INVALID_REQUEST_PARAMETER = 'invalid_request_parameter'
```

```python
nemo_gym.core.failure_kinds.JUDGE_FAILED = 'judge_failed'
```

```python
nemo_gym.core.failure_kinds.JUDGE_FAILURE_KINDS = ('judge_failed', 'judge_invalid', JUDGE_UNPARSEABLE)
```

The judge failures whose saved answer is judged again, never regenerated: a failed judge call, a verdict that did not
parse (`judge_unparseable`), and collection's own legacy class for an invalid judge response (`judge_invalid`).

```python
nemo_gym.core.failure_kinds.JUDGE_SKIPPED = 'judge_skipped'
```

```python
nemo_gym.core.failure_kinds.JUDGE_UNPARSEABLE = 'judge_unparseable'
```

```python
nemo_gym.core.failure_kinds.KILL_SHAPED = 'kill_shaped'
```

```python
nemo_gym.core.failure_kinds.MALFORMED_ANSWER = 'malformed_answer'
```

```python
nemo_gym.core.failure_kinds.MODEL_CONTEXT_LIMIT = 'model_context_limit'
```

```python
nemo_gym.core.failure_kinds.MODEL_FAULT_KINDS: frozenset[str] = frozenset(kind for kind, (classification, _) in (_DEFAULT_CLASSIFICATION.items()...
```

```python
nemo_gym.core.failure_kinds.MODEL_POLICY_RESPONSE_TIMEOUT = 'model_policy_response_timeout'
```

```python
nemo_gym.core.failure_kinds.MODEL_REQUEST_ERROR = 'model_request_error'
```

```python
nemo_gym.core.failure_kinds.MODEL_SERVER_ERROR = 'model_server_error'
```

```python
nemo_gym.core.failure_kinds.MODEL_TRANSPORT_ERROR = 'model_transport_error'
```

```python
nemo_gym.core.failure_kinds.NON_POLICY_MODEL_REJECTION = 'non_policy_model_rejection'
```

```python
nemo_gym.core.failure_kinds.PERSISTENCE_FAILED = 'persistence_failed'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_COMMAND_OUTCOME_UNKNOWN = 'provider_command_outcome_unknown'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_COMMAND_TIMEOUT = 'provider_command_timeout'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_CREATE_PENDING = 'provider_create_pending'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_CREATE_TIMEOUT = 'provider_create_timeout'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_CREDENTIALS_REJECTED = 'provider_credentials_rejected'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_FAILURE_KINDS: frozenset[str] = frozenset({PROVIDER_CREATE_TIMEOUT, PROVIDER_CREATE_PENDING, PROVIDER_NOT_READY,...
```

Registered provider observations; membership does not assign responsibility.

```python
nemo_gym.core.failure_kinds.PROVIDER_INTERNAL_ERROR = 'provider_internal_error'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_IO_TIMEOUT = 'provider_io_timeout'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_NOT_READY = 'provider_not_ready'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_OOM_KILLED = 'provider_oom_killed'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_PROTOCOL_ERROR = 'provider_protocol_error'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_PTY_BUSY = 'provider_pty_busy'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_PTY_UNAVAILABLE = 'provider_pty_unavailable'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_QUOTA_EXHAUSTED = 'provider_quota_exhausted'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_REQUEST_FAILED = 'provider_request_failed'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_SETUP_FAILED = 'provider_setup_failed'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_STATUS_UNAVAILABLE = 'provider_status_unavailable'
```

```python
nemo_gym.core.failure_kinds.PROVIDER_UNAVAILABLE = 'provider_unavailable'
```

```python
nemo_gym.core.failure_kinds.QUOTA_RESET_REGEX = 'resets at (\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2} UTC)'
```

```python
nemo_gym.core.failure_kinds.ROLLOUT_ALLOCATION_ENDED = 'rollout_allocation_ended'
```

```python
nemo_gym.core.failure_kinds.SERVER_FAULT_KINDS: frozenset[str] = frozenset(kind for kind, (classification, category) in (_DEFAULT_CLASSIFICATION....
```

```python
nemo_gym.core.failure_kinds.SERVER_SPINUP_TIMEOUT = 'server_spinup_timeout'
```

```python
nemo_gym.core.failure_kinds.SERVER_START_FAILED = 'server_start_failed'
```

```python
nemo_gym.core.failure_kinds.SESSION_EXPIRED = 'session_expired'
```

```python
nemo_gym.core.failure_kinds.SESSION_LOST = 'session_lost'
```

```python
nemo_gym.core.failure_kinds.SESSION_RELEASE_FAILED = 'session_release_failed'
```

```python
nemo_gym.core.failure_kinds.SHUTDOWN = 'shutdown'
```

```python
nemo_gym.core.failure_kinds.TRANSPORT_LOCAL_RESOURCE = 'transport_local_resource'
```

```python
nemo_gym.core.failure_kinds.TRANSPORT_PEER_DROP = 'transport_peer_drop'
```

```python
nemo_gym.core.failure_kinds.TRANSPORT_TIMEOUT = 'transport_timeout'
```

```python
nemo_gym.core.failure_kinds.TRANSPORT_UNREACHABLE = 'transport_unreachable'
```

```python
nemo_gym.core.failure_kinds.TRUNCATED_ANSWER = 'truncated_answer'
```

```python
nemo_gym.core.failure_kinds.VERIFIER_ERROR = 'verifier_error'
```

```python
nemo_gym.core.failure_kinds._DEFAULT_CLASSIFICATION: dict[str, tuple[FailureClass, str | None]] = {kind: (FailureClass.EVALUATION, None) for kind in (FAILURE_KINDS | GATE_DERIVED...
```

```python
nemo_gym.core.failure_kinds._NAMESPACED_PATTERN = re.compile('[a-z][a-z0-9_]*:[a-z][a-z0-9_]*')
```

```python
nemo_gym.core.failure_kinds._NAME_PATTERN = re.compile('[a-z][a-z0-9_]*')
```

```python
nemo_gym.core.failure_kinds._QUOTA_RESET_PATTERN = re.compile(QUOTA_RESET_REGEX)
```

```python
nemo_gym.core.failure_kinds._WARNED_UNKNOWN: set[str] = set()
```

```python
nemo_gym.core.failure_kinds.logger = logging.getLogger(__name__)
```