fiftyone.core.map.batcher¶
Module contents¶
Sample batcher package declaration.
Classes:
A sample batch |
|
|
Sample batch using ids |
|
Sample batch using slices |
-
class
fiftyone.core.map.batcher.
SampleBatch
¶ Bases:
abc.ABC
A sample batch
Methods:
split
(sample_collection, num_workers[, …])Create a list of sample batches
create_subset
(sample_collection)Create a sample collection from the batch
Attributes:
Get the total number of samples in the batch
-
abstract classmethod
split
(sample_collection: fiftyone.core.map.typing.SampleCollection[T], num_workers: int, batch_size: Optional[int] = None) → List[fiftyone.core.map.batcher.batch.SampleBatch]¶ Create a list of sample batches
-
abstract property
total
¶ Get the total number of samples in the batch
-
abstract
create_subset
(sample_collection: fiftyone.core.map.typing.SampleCollection[T]) → fiftyone.core.map.typing.SampleCollection[T]¶ Create a sample collection from the batch
-
abstract classmethod
-
class
fiftyone.core.map.batcher.
SampleIdBatch
(*sample_ids: bson.objectid.ObjectId)¶ Bases:
fiftyone.core.map.batcher.batch.SampleBatch
Sample batch using ids
Methods:
Get max batch size
split
(sample_collection, num_workers[, …])Create a list of sample batches
create_subset
(sample_collection)Create a sample collection from the batch
Attributes:
Get the total number of samples in the batch
-
classmethod
get_max_batch_size
()¶ Get max batch size
-
classmethod
split
(sample_collection: fiftyone.core.map.typing.SampleCollection[T], num_workers: int, batch_size: Optional[int] = None) → List[fiftyone.core.map.batcher.id_batch.SampleIdBatch]¶ Create a list of sample batches
-
property
total
¶ Get the total number of samples in the batch
-
create_subset
(sample_collection: fiftyone.core.map.typing.SampleCollection[T]) → fiftyone.core.map.typing.SampleCollection[T]¶ Create a sample collection from the batch
-
classmethod
-
class
fiftyone.core.map.batcher.
SampleSliceBatch
(start_idx: int, stop_idx: int)¶ Bases:
fiftyone.core.map.batcher.batch.SampleBatch
Sample batch using slices
Methods:
split
(sample_collection, num_workers[, …])Create a list of sample batches
create_subset
(sample_collection)Create a sample collection from the batch
Attributes:
Get the total number of samples in the batch
-
classmethod
split
(sample_collection: fiftyone.core.map.typing.SampleCollection[T], num_workers: int, batch_size: Optional[int] = None) → List[fiftyone.core.map.batcher.slice_batch.SampleSliceBatch]¶ Create a list of sample batches
-
property
total
¶ Get the total number of samples in the batch
-
create_subset
(sample_collection: fiftyone.core.map.typing.SampleCollection[T]) → fiftyone.core.map.typing.SampleCollection[T]¶ Create a sample collection from the batch
-
classmethod