nemo_gym.token_id_capture.conformance
nemo_gym.token_id_capture.conformance
Verify that an external token-capture transport follows Gym’s protocols.
A framework transport can replace Gym’s file store.
For example, NeMo-RL can carry records through a transfer queue.
An incorrect implementation can lose records or make a committed parent invisible to another client.
run_conformance checks these behaviors directly.
Factories must return fresh client instances over the same shared backend.
The checks use fresh instances to verify cross-client visibility.
Each check uses its own rollout id, so failed checks cannot poison later ones.
This module avoids FastAPI, Ray, Torch, and aiohttp imports.
Module Contents
Classes
Functions
Data
API
Bases: AssertionError
One named contract check failed.
Simulate a retry that resends the same serialized entry.
Build a committed entry with the metadata that capture_tokens records.
Run the ordered contract checks and return the names that passed.
Raise ConformanceError on the first failure.
Lineage checks are skipped without a lineage_factory.
The begin_call check is skipped when the sink lacks the extension.