Skip to content

Commit 784b915

Browse files
Merge pull request #726 from mlcommons/num_workers_fix
Add warning for PyTorch data loader num_workers flag.
2 parents 9365996 + d492d69 commit 784b915

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

submission_runner.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,12 @@
154154
flags.DEFINE_boolean('set_pytorch_max_split_size',
155155
False,
156156
'If true, set pytorch max_split_size_mb to 256')
157-
flags.DEFINE_integer('pytorch_eval_num_workers',
158-
0,
159-
'Number of workers for PyTorch evaluation data loaders.')
157+
flags.DEFINE_integer(
158+
'pytorch_eval_num_workers',
159+
0,
160+
'Number of workers for ImageNet PyTorch evaluation data loaders.'
161+
'WARNING: Setting pytorch_eval_num_workers != 0, will result '
162+
'in incorrect evals currently, see issues/732.')
160163
FLAGS = flags.FLAGS
161164
USE_PYTORCH_DDP, RANK, DEVICE, N_GPUS = pytorch_setup()
162165

@@ -634,6 +637,12 @@ def main(_):
634637
if FLAGS.framework == 'pytorch':
635638
pytorch_init(USE_PYTORCH_DDP, RANK, profiler)
636639

640+
# TODO: remove once issue resolved.
641+
if FLAGS.pytorch_eval_num_workers != 0:
642+
logging.warning(
643+
'WARNING: Setting pytorch_eval_num_workers != 0, will result '
644+
'in incorrect evals currently, see issues/732.')
645+
637646
workload_metadata = WORKLOADS[FLAGS.workload]
638647

639648
# Prevent OOM on librispeech conformer.

0 commit comments

Comments
 (0)