APIs#
Walk through RLinf’s most essential API interfaces and how to use them. These key APIs are exposed to users to simplify the complex data flows of RL, allowing them to focus on higher-level abstractions without needing to worry about the underlying implementations.
This API documentation proceeds bottom-up, starting with the foundational APIs of RLinf, including:
API |
What you get |
|---|---|
A unified interface for workers and worker groups. |
|
An introduction to RLinf’s GPU placement strategies. |
|
Support for distributed training via clusters. |
|
Low-level communication primitives, including a producer-consumer queue abstraction. |
After that, we introduce the upper-layer APIs used to implement different stages of RL:
API |
What you get |
|---|---|
Actor wrappers based on FSDP and Megatron. |
|
Rollout wrappers built on Hugging Face and SGLang. |
|
Environment wrappers for embodied intelligence scenarios. |
|
Data structures transferred between different workers. |
|
Embodied Env/Rollout data structures. |
|
Trajectory replay buffer design and sampling. |