sample#
- MultiAgentReplayBuffer.sample(num_items: int, policy_id: str | None = None, **kwargs) SampleBatch | MultiAgentBatch | Dict[str, Any] | None[source]#
Samples a MultiAgentBatch of
num_itemsper one policy’s buffer.If less than
num_itemsrecords are in the policy’s buffer, some samples in the results may be repeated to fulfil the batch sizenum_itemsrequest. Returns an empty batch if there are no items in the buffer.- Parameters:
- Returns:
Concatenated MultiAgentBatch of items.
**kwargs: Forward compatibility kwargs.- Return type:
DeveloperAPI: This API may change across minor Ray releases.