raffalib.tqdm
Functions
|
Create a progress bar wrapper that batches items. |
Module Contents
- raffalib.tqdm.tqdm_batch(items, batch_size)
Create a progress bar wrapper that batches items.
- Parameters:
items (Sized) – The sized iterable to wrap with a progress bar.
batch_size (int) – Number of items per batch.
- Returns:
A
functools.partialobject that, when called, returns a tqdm progress bar over batched items.- Return type:
functools.partial
- Example:
>>> for batch in tqdm_batch(my_list, 100)(): ... process(batch)