ray.rllib.policy.eager_tf_policy_v2.EagerTFPolicyV2.load_batch_into_buffer#

EagerTFPolicyV2.load_batch_into_buffer(batch: SampleBatch, buffer_index: int = 0) int#

Bulk-loads the given SampleBatch into the devices’ memories.

The data is split equally across all the Policy’s devices. If the data is not evenly divisible by the batch size, excess data should be discarded.

Parameters:
  • batch – The SampleBatch to load.

  • buffer_index – The index of the buffer (a MultiGPUTowerStack) to use on the devices. The number of buffers on each device depends on the value of the num_multi_gpu_tower_stacks config key.

Returns:

The number of tuples loaded per device.