Rollout Collection
In the previous tutorial, you set up NeMo Gym and ran your first agent interaction. But to train an agent with reinforcement learning, you need hundreds or thousands of these interactions—each one scored and saved. That’s what rollout collection does.
Goal: Generate and view your first batch of rollouts.
Time: ~10 minutes | Cost: ~$0.05 (OpenAI API)
In this tutorial, you will:
- Inspect your input data
- Run batch rollout collection
- Examine the collected rollouts
Prerequisites
Make sure you have:
- ✅ Completed Detailed Setup Guide
- ✅ Servers still running (or ready to restart them)
- ✅
env.yamlconfigured with your OpenAI API key - ✅ Virtual environment activated
What’s in a rollout? A complete record of a task execution: the input, the model’s reasoning and tool calls, the final output, and a verification score.
1. Inspect the Data
Look at the example dataset included with the Example Single Tool Call resources server:
Each line contains a responses_create_params object with:
- input: The conversation messages (user query)
- tools: Available tools the agent can use
2. Verify Servers Are Running
If you still have servers running from the Detailed Setup Guide tutorial, proceed to the next step.
If not, start them again:
✅ Success Check: You should see 3 Gym servers running including the example_single_tool_call_simple_agent, along with the head server.
3. Generate Rollouts
In a separate terminal, run:
Today’s LLM endpoints are not fully deterministic, which means that running the same request multiple times will yield different results every time. However, you can improve the reproducibility of your rollouts by setting the temperature parameter to 0.0. For example:
However, using temperature=0.0 may result in degraded performance in certain use case scenarios. If temperature is not set, the default temperature for that model endpoint will typically be used, which has been tuned to fit the average use case scenario.
Using temperature=0.0 will still not guarantee the same result when running the same request multiple times, but it will reduce the output variance considerably.
✅ Success Check: You should see:
4. View Rollouts
Each rollout row should contain:
- Input: The original query and tools
- Response: Tool calls and agent output
- Reward: Verification score (0.0–1.0)
Rollout Generation Parameters
Essential
Data Control
Model Behavior
Next Steps
Congratulations! You now have a working NeMo Gym installation and understand how to generate rollouts. Choose your path based on your goals: