peal.data.dataloaders.resolve_num_workers¶
- peal.data.dataloaders.resolve_num_workers(training_config=None)[source]¶
Worker processes for the loaders
get_dataloaderbuilds.The default stays 0, i.e. the behaviour before 2026-09-25: images are decoded and resized on the training process between GPU steps, which the generator code measured at ~15 % GPU utilisation. Raise it per config (
training.num_workers) or globally ($PEAL_NUM_WORKERS); the config wins when it is non-zero. It is not raised by default because a dataset that lazily attaches a CUDA model (calculate_outlier_score) cannot be forked into workers, and that has to be checked per dataset first.- Parameters:
training_config (
TrainingConfig, optional) – Read for itsnum_workersfield.- Returns:
Number of worker processes,
0for in-process loading.- Return type: