class documentation
class Batcher(abc.ABC): (source)
Known subclasses: fiftyone.core.utils.BaseChunkyBatcher
, fiftyone.core.utils.ContentSizeBatcher
Constructor: Batcher(iterable, transform_fn, return_views, progress, total)
Base class for iterating over the elements of an iterable in batches.
Parameters | |
iterable | an iterable to batch over |
transform | a transform function to apply to each item |
return | whether to return each batch as a
fiftyone.core.view.DatasetView . Only applicable when the
iterable is a fiftyone.core.collections.SampleCollection |
progress | whether to render a progress bar tracking the consumption of the batches (True/False), use the default value fiftyone.config.show_progress_bars (None), or a progress callback function to invoke instead |
total | the length of iterable. Only applicable when progress=True. If not provided, it is computed via len(iterable), if possible |
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __next__ |
Undocumented |
Instance Variable | iterable |
Undocumented |
Instance Variable | progress |
Undocumented |
Instance Variable | return |
Undocumented |
Instance Variable | total |
Undocumented |
Instance Variable | transform |
Undocumented |
Instance Variable | _in |
Undocumented |
Instance Variable | _iter |
Undocumented |
Instance Variable | _last |
Undocumented |
Instance Variable | _last |
Undocumented |
Instance Variable | _num |
Undocumented |
Instance Variable | _pb |
Undocumented |
Instance Variable | _render |
Undocumented |
def __init__(self, iterable, transform_fn=None, return_views=False, progress=False, total=None):
(source)
¶
overridden in
fiftyone.core.utils.BaseDynamicBatcher
, fiftyone.core.utils.ContentSizeBatcher
, fiftyone.core.utils.StaticBatcher
Undocumented
overridden in
fiftyone.core.utils.ContentSizeDynamicBatcher
, fiftyone.core.utils.LatencyDynamicBatcher
, fiftyone.core.utils.StaticBatcher
Undocumented