nemo_gym.utils.exception_inspection
nemo_gym.utils.exception_inspection
Read facts from any Python exception: its explicit causes, its type name and its HTTP status.
These functions know nothing about Gym’s failure types; nemo_gym.core.typed_exceptions builds on them.
Module Contents
Functions
Data
API
text, or its start with TRUNCATION_MARKER when it is longer than max_chars.
The HTTP status error carries as an int: status (aiohttp), status_code (FastAPI, SDKs) or
http_status (Gym); None when it carries none.
error and then each __cause__ (raise ... from), outermost first.
__context__ (an exception that was only being handled, such as a retry’s earlier attempt) is not a
cause and is not followed. A cycle stops the walk.
The provider’s own code for an SDK error (OpenSandbox’s error.code, e.g. SANDBOX::ENDED), else the
error’s type name.
module.QualName of error’s type; a builtin type is its bare name.
[sandbox phase=... provider=... sandbox=... reason=... http=... exit=... signal=... command=...] : what a
producer knows about a sandbox failure, as a fixed-order prefix of its failure_reason, so a saved record says
in which phase, on which sandbox and with which provider status it failed. Unknown facts are left out; each value
is one bounded token. It decides nothing: no reader classifies a failure from it.