From c242705bc56693f8343731e2d78efe79896a43ea Mon Sep 17 00:00:00 2001 From: Reed Date: Tue, 31 Jul 2018 15:34:40 -0700 Subject: [PATCH] Fix another crash on single-core systems. (#4962) --- official/recommendation/data_preprocessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official/recommendation/data_preprocessing.py b/official/recommendation/data_preprocessing.py index 7c98b0174..be0c8bd28 100644 --- a/official/recommendation/data_preprocessing.py +++ b/official/recommendation/data_preprocessing.py @@ -395,7 +395,7 @@ def instantiate_pipeline(dataset, data_dir, batch_size, eval_batch_size, # By limiting the number of workers we guarantee that the worker # pool underlying the training generation doesn't starve other processes. - num_workers = int(multiprocessing.cpu_count() * 0.75) + num_workers = int(multiprocessing.cpu_count() * 0.75) or 1 subproc_args = popen_helper.INVOCATION + [ "--data_dir", data_dir, -- GitLab