fiftyone.core.map.batcher.id_batch#

Abstract mapping backend

Copyright 2017-2025, Voxel51, Inc.

Classes:

SampleIdBatch(*sample_ids)

Sample batch using ids

class fiftyone.core.map.batcher.id_batch.SampleIdBatch(*sample_ids: ObjectId)#

Bases: SampleBatch

Sample batch using ids

Methods:

get_max_batch_size()

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:

total

Get the total number of samples in the batch

classmethod get_max_batch_size()#

Get max batch size

classmethod split(sample_collection: SampleCollection[T], num_workers: int, batch_size: int | None = None) List[SampleIdBatch]#

Create a list of sample batches

property total: int#

Get the total number of samples in the batch

create_subset(sample_collection: SampleCollection[T]) SampleCollection[T]#

Create a sample collection from the batch