JSONL Datasets
Each line of a JSONL dataset is one task: the prompt the agent sees, plus anything your verifier needs to score the answer. A Resources Server, a Python server you write or reuse, provides the tools and the scoring code that every task shares.
JSONL rows fit many tasks that share one verifier and toolset, such as math, instruction following or tool calling. Tasks that each need their own software environment, such as terminal and coding tasks, fit Harbor Task Folders better.
Data Format
Each JSONL line requires a responses_create_params field following the OpenAI Responses API schema. You don’t need an OpenAI account: local servers such as vLLM use the same format.
Additional fields like expected_answer vary by resources server—the component that provides tools and reward signals.
Required Fields
Optional Fields
Check resources_servers/<name>/README.md for fields required by each resources server’s verify() method.
The agent_ref Field
The agent_ref field maps each row to a specific agent server, which in turn knows its resources server from the YAML config. A training dataset can blend multiple agent servers in a single file—agent_ref tells NeMo Gym which server handles each row.
You don’t create agent_ref manually. The gym dataset collate tool adds it automatically based on your config file. The tool matches the agent type (responses_api_agents) with the agent name from the config.
Example Data
Quick Start
Run this command from the repository root:
Success: Finished! message and data/test/example_metrics.json created.
Dataset Types
Configuration
Define datasets in your agent server’s YAML config:
Dataset source
source is the unified way to declare where a dataset is fetched from. type selects the backend; the remaining fields are backend-specific:
The legacy huggingface_identifier: / gitlab_identifier: blocks still work (a deprecation warning is emitted), so existing configs keep running — but new configs should use source:.
Valid Licenses
Apache 2.0 · MIT · GNU General Public License v3.0 · Creative Commons Attribution 4.0 International · Creative Commons Attribution-ShareAlike 4.0 International · TBD · NVIDIA Internal Use Only, Do Not Distribute
Workflow
Validation Modes
To prepare training data with auto-download:
HuggingFace downloads require authentication. Set hf_token in env.yaml or export HF_TOKEN.
Common Errors
Guides
CLI Commands
See CLI Commands for details.
Large Datasets
- Validation streams line-by-line (memory-efficient)
- Single-threaded; >100K samples may take minutes
- Use
num_repeatsinstead of duplicating JSONL lines