ray.rllib.policy.sample_batch.MultiAgentBatch#
- class ray.rllib.policy.sample_batch.MultiAgentBatch(policy_batches: Dict[str, SampleBatch], env_steps: int)[source]#
A batch of experiences from multiple agents in the environment.
- policy_batches#
Dict mapping policy IDs to SampleBatches of experiences.
- Type:
Dict[PolicyID, SampleBatch]
- count#
The number of env steps in this batch.
Methods
Initialize a MultiAgentBatch instance.
The number of agent steps (there are >= 1 agent steps per env step).
Simply returns
self
(already a MultiAgentBatch).Compresses each policy batch (per column) in place.
Deep-copies self into a new MultiAgentBatch.
Decompresses each policy batch (per column), if already compressed.
The number of env steps (there are >= 1 agent steps per env step).
- returns:
The overall size in bytes of all policy batches (all columns).
Returns k-step batches holding data for each agent at those steps.
TODO: transfer batch to given device as framework tensor.
Returns SampleBatch or MultiAgentBatch, depending on given policies.