SingleBatcher (autotransform.batcher.single)
The implementation for the SingleBatcher.
- class autotransform.batcher.single.SingleBatcher(*, title: str, metadata: Dict[str, Any] | None = None, skip_empty_batch: bool = False)
Bases:
BatcherA batcher which puts all Items together in to a single batch.
- title
The title to use for the Batch.
- Type:
str
- metadata
The metadata to use for the Batch. Defaults to None.
- Type:
Optional[Dict[str, Any]], optional
- skip_empty_batch
Whether to skip Batch creation if there are no Items. Defaults to False.
- Type:
Optional[bool], optional
- name
The name of the Component.
- Type:
ClassVar[BatcherName]
- batch(items: Sequence[Item]) List[Batch]
Takes in a list Items and batches them together in to a single Batch.
- metadata: Dict[str, Any] | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: ClassVar[BatcherName] = 'single'
- skip_empty_batch: bool
- title: str