rlightning.types.batched_data¶
Batched data container for environment and policy data.
This module provides the BatchedData class for holding collections of environment returns or policy responses, supporting both local data and Ray ObjectRefs for distributed execution.
- class rlightning.types.batched_data.BatchedData(ids: List[Any], data: List[Any | MockModule('ray.ObjectRef')])[source]¶
Bases:
objectContainer for batched data with associated identifiers.
Holds either actual data or Ray ObjectRefs, maintaining the order of (id, data) pairs. Allows duplicate IDs.
- is_future¶
True if any data element is a Ray ObjectRef.
- static from_dict(data_dict: Dict) BatchedData[source]¶
Create BatchedData from a dictionary.
- Parameters:
data_dict – Dictionary mapping IDs to data.
- Returns:
BatchedData instance.