Remove warning upon using generator inputs with multiprocessing.

PiperOrigin-RevId: 308634551
Change-Id: I3adf48e4955ee935ca30c3247bcdb45e18dc96c9
This commit is contained in:
Francois Chollet 2020-04-27 09:22:35 -07:00 committed by TensorFlower Gardener
parent 6e4340799c
commit 4b5639542c
1 changed files with 0 additions and 5 deletions

View File

@ -849,11 +849,6 @@ class GeneratorDataAdapter(DataAdapter):
max_queue_size):
"""Create a callable, possibly including an Enqueuer."""
if workers > 1 or (workers > 0 and use_multiprocessing):
if use_multiprocessing:
logging.warning(
UserWarning("Using a generator with `use_multiprocessing=True` "
"and multiple workers may duplicate your data. "
"Please consider using the `tf.data.Dataset`."))
def generator_fn():
enqueuer = data_utils.GeneratorEnqueuer(
x, use_multiprocessing=use_multiprocessing)