class documentation

Base class for iterating over the elements of an iterable in batches.

Method __enter__ Undocumented
Method __exit__ Undocumented
Method __init__ Undocumented
Method __iter__ Undocumented
Method __next__ Undocumented
Method apply_backpressure Apply backpressure needed to rightsize the next batch.
Class Variable manual_backpressure Undocumented
Instance Variable iterable Undocumented
Instance Variable progress Undocumented
Instance Variable return_views Undocumented
Instance Variable total Undocumented
Method _compute_batch_size Return next batch size. Concrete classes must implement.
Instance Variable _in_context Undocumented
Instance Variable _iter Undocumented
Instance Variable _last_batch_size Undocumented
Instance Variable _last_offset Undocumented
Instance Variable _manually_applied_backpressure Undocumented
Instance Variable _num_samples Undocumented
Instance Variable _pb Undocumented
Instance Variable _render_progress Undocumented
def __enter__(self): (source)

Undocumented

def __exit__(self, *args): (source)

Undocumented

def __init__(self, iterable, return_views=False, progress=False, total=None): (source)
def __iter__(self): (source)

Undocumented

def __next__(self): (source)

Undocumented

def apply_backpressure(self, *args, **kwargs): (source)

Apply backpressure needed to rightsize the next batch.

Required to be implemented and called every iteration, if self.manual_backpressure == True.

Subclass defines arguments and behavior of this method.

manual_backpressure: bool = (source)
iterable = (source)

Undocumented

@abc.abstractmethod
def _compute_batch_size(self): (source)

Return next batch size. Concrete classes must implement.

_in_context: bool = (source)

Undocumented

Undocumented

_last_batch_size = (source)

Undocumented

_last_offset: int = (source)

Undocumented

_manually_applied_backpressure: bool = (source)
_num_samples = (source)

Undocumented

Undocumented

_render_progress = (source)

Undocumented