class documentation

Context that saves samples from a collection according to a configurable batching strategy.

Parameters
sample_collectiona fiftyone.core.collections.SampleCollection
batch_sizethe batch size to use. If a batching_strategy is provided, this parameter configures the strategy as described below. If no batching_strategy is provided, this can either be an integer specifying the number of samples to save in a batch (in which case batching_strategy is implicitly set to "static") or a float number of seconds between batched saves (in which case batching_strategy is implicitly set to "latency")
batching_strategy

the batching strategy to use for each save operation. Supported values are:

  • "static": a fixed sample batch size for each save
  • "size": a target batch size, in bytes, for each save
  • "latency": a target latency, in seconds, between saves

By default, fo.config.default_batcher is used

Method __enter__ Undocumented
Method __exit__ Undocumented
Method __init__ Undocumented
Method save Registers the sample for saving in the next batch.
Instance Variable batch_size Undocumented
Instance Variable sample_collection Undocumented
Method _save_batch Undocumented
Instance Variable _batch_ids Undocumented
Instance Variable _batching_strategy Undocumented
Instance Variable _curr_batch_size Undocumented
Instance Variable _curr_batch_size_bytes Undocumented
Instance Variable _dataset Undocumented
Instance Variable _frame_coll Undocumented
Instance Variable _frame_ops Undocumented
Instance Variable _is_generated Undocumented
Instance Variable _last_time Undocumented
Instance Variable _reload_parents Undocumented
Instance Variable _sample_coll Undocumented
Instance Variable _sample_ops Undocumented
def __enter__(self): (source)

Undocumented

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

Undocumented

def __init__(self, sample_collection, batch_size=None, batching_strategy=None): (source)

Undocumented

def save(self, sample): (source)

Registers the sample for saving in the next batch.

Parameters
samplea fiftyone.core.sample.Sample or fiftyone.core.sample.SampleView
batch_size: None = (source)

Undocumented

sample_collection = (source)

Undocumented

def _save_batch(self): (source)

Undocumented

_batch_ids: list = (source)

Undocumented

_batching_strategy = (source)

Undocumented

_curr_batch_size: int = (source)

Undocumented

_curr_batch_size_bytes = (source)

Undocumented

_dataset = (source)

Undocumented

_frame_coll = (source)

Undocumented

_frame_ops: list = (source)

Undocumented

_is_generated = (source)

Undocumented

_last_time = (source)

Undocumented

_reload_parents: list = (source)

Undocumented

_sample_coll = (source)

Undocumented

_sample_ops: list = (source)

Undocumented