- recpack.algorithms.util.get_batches(iterable: Iterable, batch_size=1000) Iterator[List]
Get batches from an iterable.
The final batch might contain less than batch_size entries, as it will be the remainder.
iterable (Iterable) – List of values that will be split into batches of size batch_size
batch_size (int, optional) – Size of each batch, defaults to 1000
Iterator of lists of values
- Return type