nemo_gym.token_id_capture.staging.records
nemo_gym.token_id_capture.staging.records
Versioned wire records for framework-owned token staging.
Module Contents
Classes
Functions
Data
WORKER_MISSING_COMMIT_COORDS_REASON
API
Bases: _DigestWireModel
One token-free call manifest row in a rollout’s capture ledger.
Bases: _WireModel
Gate-to-worker identity and exact-prefix contract for one model call.
A token_in admission carries its prefix in one of two encodings.
required_prefix_token_ids holds the ids inline.
staging_chain names the staged records whose token deltas form the prefix.
The worker resolves either encoding to a flat id list.
It passes that list to CaptureAdapter.enter_prefix and to RolloutTokenCapture.begin_call.
Bases: _WireModel
One successfully staged call, as handed to CaptureLedger.record.
record is the manifest row. The remaining fields feed parent resolution
and are not part of the manifest.
Bases: _DigestWireModel
Metadata returned after an inference worker stages one call.
Bases: _WireModel
A checkpointed prefix of the same call, which the worker continues instead of regenerating.
The replacement attempt re-issues the call that was in flight at the checkpoint.
The worker reads the staged prefix named by staging_keys, verifies its length and digest,
and generates only the remaining tokens within effective_output_limit.
A terminal finish reason means the cut captured a finished generation
that the worker returns without generating more.
Bases: _WireModel
The token-free ledger read returned by the manifest control route.
Bases: _DigestWireModel
Token-free immutable manifest the framework assembles at rollout end.
Keep the terminal fields in one of the three documented states.
A trainable receipt names its terminal and the method that chose it. An
unset terminal_selection is reserved for receipts where no attribution
stage ran, which cannot name a terminal and must be poisoned with a reason.
A poisoned receipt may still carry a terminal and method, because
attribution can succeed before another call poisons the rollout.
Bases: _WireModel
The result of retiring or deleting rollouts in a capture store or ledger.
Bases: _DigestWireModel
Token columns and metadata for one staged call.
This model excludes the optional extras payload.
Validation recomputes the call digest from these fields and the recorded extras_digest.
It does not verify that the corresponding extras payload exists or matches that digest.
A consumer that loads extras must verify them separately with compute_extras_digest.
Bases: StagedCallBaseSnapshot
One normalized token delta made durable by a framework staging sink.
Validate local components and compute their digest exactly once.
Runs normal field, integrity, and extras validators. Wire constructors still require a supplied digest and verify it against the contents.
Raises:
ValueError: A mask or log probability is not an exact Python float.ValidationError: Other components fail field or integrity validation.
Bases: StagedCallRecord
The exact staged record returned by a framework-owned source.
Bases: BaseModel
Return the default deterministic key used by the NeMo RL backend.