Remove warning upon using generator inputs with multiprocessing.
PiperOrigin-RevId: 308634551 Change-Id: I3adf48e4955ee935ca30c3247bcdb45e18dc96c9
This commit is contained in:
parent
6e4340799c
commit
4b5639542c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue