Background
Teams running production evals on top of Gym have built an external validation pipeline — evalpipeline — to fill a gap: Gym collects rollouts and computes aggregate metrics but has no mechanism to verify rollout quality before those metrics are reported. evalpipeline runs as a post-processing layer on top of Gym output, classifying trajectories as clean or dirty, gating aggregation on data quality, and selecting minimum clean repeats per problem before scores are surfaced.
This is a bandaid on the absence of first-class quality validation in Gym. This epic ports those capabilities natively into Gym so teams don't need an external pipeline to get trustworthy eval results.
** Internal Resources:**
What evalpipeline does today
evalpipeline is a thin CLI that runs four ordered stages after a Gym eval job:
- pre-run-check — dry-run and API endpoint probes before the eval starts; fails fast if the environment isn't ready
- run-evaluation — runs the backend eval command with explicit overrides; records the exact command executed
- verify-artifacts — reads raw trajectories, classifies each as clean or dirty based on: zero-token turns, missing agent steps, missed metrics, fully-zero rollouts; writes
trajectories_atif.jsonl and a verification_summary.json
- scavenge-artifacts — from the verified trajectories, selects the minimum required number of clean repeats per problem; records shortfalls (problems without enough clean repeats) in
scavenge_summary.json; writes trajectories_scavenged.jsonl
The verification logic is pure and backend-independent. The architecture already anticipates Gym as a first-class backend.
What needs to be built in Gym
Rollout quality verification
After rollout collection, classify each rollout against cleanliness criteria: zero-token turns, missing agent steps, missed metrics, infrastructure placeholder responses. Surface clean/dirty counts alongside aggregate metrics. Today none of this is visible to the user.
Minimum clean repeat gating
Before reporting aggregate metrics for a benchmark, verify that each task has the required number of clean rollouts. If shortfalls exist, report which tasks are incomplete rather than silently computing metrics over partial data.
Pre-run checks
Before starting a long eval run, validate that the environment is reachable and configured correctly. Today config mistakes surface only after Ray init and server startup.
Artifact quality summary
Alongside _aggregate_metrics.json, produce a structured quality summary covering clean/dirty rollout counts, shortfalls by task, and any cleanliness failures — so users and downstream tooling can gate on data quality, not just metric values.
Out of scope
- Porting the ATIF trajectory format as a required schema for all Gym rollouts — quality verification should work against Gym's existing output format
- Replacing
evalpipeline as a standalone tool for teams that need it outside Gym
- Changes to verifier or agent authoring contracts
Acceptance criteria
Background
Teams running production evals on top of Gym have built an external validation pipeline —
evalpipeline— to fill a gap: Gym collects rollouts and computes aggregate metrics but has no mechanism to verify rollout quality before those metrics are reported.evalpipelineruns as a post-processing layer on top of Gym output, classifying trajectories as clean or dirty, gating aggregation on data quality, and selecting minimum clean repeats per problem before scores are surfaced.This is a bandaid on the absence of first-class quality validation in Gym. This epic ports those capabilities natively into Gym so teams don't need an external pipeline to get trustworthy eval results.
** Internal Resources:**
What
evalpipelinedoes todayevalpipelineis a thin CLI that runs four ordered stages after a Gym eval job:trajectories_atif.jsonland averification_summary.jsonscavenge_summary.json; writestrajectories_scavenged.jsonlThe verification logic is pure and backend-independent. The architecture already anticipates Gym as a first-class backend.
What needs to be built in Gym
Rollout quality verification
After rollout collection, classify each rollout against cleanliness criteria: zero-token turns, missing agent steps, missed metrics, infrastructure placeholder responses. Surface clean/dirty counts alongside aggregate metrics. Today none of this is visible to the user.
Minimum clean repeat gating
Before reporting aggregate metrics for a benchmark, verify that each task has the required number of clean rollouts. If shortfalls exist, report which tasks are incomplete rather than silently computing metrics over partial data.
Pre-run checks
Before starting a long eval run, validate that the environment is reachable and configured correctly. Today config mistakes surface only after Ray init and server startup.
Artifact quality summary
Alongside
_aggregate_metrics.json, produce a structured quality summary covering clean/dirty rollout counts, shortfalls by task, and any cleanliness failures — so users and downstream tooling can gate on data quality, not just metric values.Out of scope
evalpipelineas a standalone tool for teams that need it outside GymAcceptance criteria
gym eval runandgym eval aggregate_aggregate_metrics.json