Creator#
Module for creating dataloaders for multiple conditions.
- class _Creator(batching_mode, batch_size, shuffle, automatic_batching, num_workers, pin_memory, conditions)[source]#
Bases:
objectUtility class for creating data loaders associated with multiple conditions.
The class supports different batching strategies to adapt data loading behavior to specific training requirements
Initialization of the
_Creatorclass.- Parameters:
batching_mode (str) – The strategy used to aggregate batches across data loaders. Available options are
"common_batch_size"for uniform batch sizes across conditions,"proportional"for batch sizes proportional to dataset sizes, and"separate_conditions"for iterating through each condition separately.batch_size (int) – Batch size configuration used by the selected batching strategy. For
"common_batch_size", the same batch size is assigned to all conditions. For"proportional", this value represents the total batch size distributed proportionally across conditions. For"separate_conditions", this value is applied independently to each condition and capped by the corresponding dataset size.shuffle (bool) – Whether samples should be shuffled during loading.
automatic_batching (bool) – Whether automatic batching should be enabled in the data loaders.
num_workers (int) – The number of worker processes used for data loading.
pin_memory (bool) – Whether data loaders should pin memory.
conditions (dict[str, BaseCondition]) – The mapping between condition names and condition objects responsible for data loader creation.