Gym Integration
Serve NEL benchmarks for NeMo Gym training and consume remote Gym environments for evaluation.
Architecture
There are three integration modes:
Set your model endpoint once before running the nel eval run examples:
Mode 1: Serve for Gym Training
Start the environment server
The server speaks Gym’s native protocol:
POST /seed_session— returns prompt and expected answerPOST /verify— accepts response, returns{reward: float}GET /health— health checkGET /dataset_size— number of problems
Point Gym at it
In your Gym training config:
Get decision-grade scores after training
The same server also speaks NEL’s enriched protocol:
This produces the full artifact suite (trajectories, CI, failure analysis) from the same environment.
Mode 2: Export for ng_collect_rollouts
For batch rollout collection without a live server:
Or via Python:
Mode 3: Consume a Remote Environment
Evaluate a model against any running nel serve endpoint using GymEnvironment:
Because NEL makes the model call (not the environment server), you get full observability: per-request latency, token counts, reasoning tokens, failure categorization.
Managed Gym Environments
For environments that need a server started and stopped automatically, use gym:// with a benchmark name (not host:port). The registry auto-detects that it’s a name and starts a managed server:
Or with a custom server command:
The server is started automatically, health-checked, used for evaluation, and torn down on completion.