Rollout Service API
The Rollout service generates training samples using SGLang engines. It is deployed as a Ray Serve deployment with a FastAPI ingress, exposing HTTP endpoints for lifecycle management, evaluation, and async weight-update coordination.
Overview
| Property | Value |
|---|---|
| Module | relax.components.rollout |
| Deployment | @serve.deployment |
| Ingress | FastAPI |
Lifecycle
The Rollout runs a background loop that:
- Generates samples via
RolloutManager.generate()using SGLang engines - Computes rewards via pluggable reward functions (
rm_hub/) - Publishes data to
TransferQueuefor the Actor to consume - Optionally triggers evaluation at configured intervals
- Manages staleness bounds to avoid data drift
Async Weight Coordination
In fully-async mode, the Rollout service coordinates with the Actor for weight updates:
- Actor calls
/can_do_update_weight_for_asyncto check if rollout can pause - Rollout pauses if data production is complete for current step
- Actor pushes new weights
- Actor calls
/end_update_weightto resume rollout
HTTP Endpoints
Source
- Implementation:
relax/components/rollout.py - Base class:
relax/components/base.py
