File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
otx/algorithms/classification/adapters/mmcls Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
1111### Bug fixes
1212
1313- Fix a bug that auto adapt batch size doesn't work with cls incr case (< https://github.com/openvinotoolkit/training_extensions/pull/2199 > )
14+ - Fix a bug that persistent worker is True even if num_workers is zero (< https://github.com/openvinotoolkit/training_extensions/pull/2208 > )
1415
1516### Known issues
1617
Original file line number Diff line number Diff line change @@ -252,14 +252,16 @@ def _infer_model(
252252
253253 # Data loader
254254 mm_dataset = build_dataset (cfg .data .test )
255+ workers_per_gpu = cfg .data .test_dataloader .get ("workers_per_gpu" , 0 )
255256 dataloader = build_dataloader (
256257 mm_dataset ,
257258 samples_per_gpu = cfg .data .test_dataloader .get ("samples_per_gpu" , 1 ),
258- workers_per_gpu = cfg . data . test_dataloader . get ( " workers_per_gpu" , 0 ) ,
259+ workers_per_gpu = workers_per_gpu ,
259260 num_gpus = len (cfg .gpu_ids ),
260261 dist = cfg .distributed ,
261262 seed = cfg .get ("seed" , None ),
262263 shuffle = False ,
264+ persistent_workers = (workers_per_gpu > 0 ),
263265 )
264266
265267 # Model
You can’t perform that action at this time.
0 commit comments