ray.rllib.policy.sample_batch.SampleBatch.slice#

SampleBatch.slice(start: int, end: int, state_start=None, state_end=None) SampleBatch[source]#

Returns a slice of the row data of this batch (w/o copying).

Parameters:
  • start – Starting index. If < 0, will left-zero-pad.

  • end – Ending index.

Returns:

A new SampleBatch, which has a slice of this batch’s data.