Unexpected behavior in tf.data.Dataset.from_generator when there is a naming collision #67566
Labels
comp:data
tf.data related issues
stat:awaiting tensorflower
Status - Awaiting response from tensorflower
TF 2.16
type:bug
Bug
Issue type
Documentation Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.15.0
Custom code
Yes
OS platform and distribution
colab
Mobile device
No response
Python version
3.10.12
Bazel version
No response
GCC/compiler version
11.4.0
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
When creating a
tf.data.Dataset
object usingfrom_generator
a naming collision with an iterable used in thegenerator
parameter causes a crash.On Ubuntu I got the following error (not in colab):
date: F external/local_tsl/tsl/platform/default/env.cc:74] Check failed: ret == 0 (11 vs. 0)Thread tf_data_private_threadpool creation via pthread_create() failed.
Standalone code to reproduce the issue
Relevant log output
Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] tf.__version__ = '2.15.0' All good so far gen called x = 0 x = 1 tf.Tensor(0, shape=(), dtype=int32) tf.Tensor(1, shape=(), dtype=int32) x = 2 x = 3 x = 4 tf.Tensor(2, shape=(), dtype=int32) x = 5 tf.Tensor(3, shape=(), dtype=int32) tf.Tensor(4, shape=(), dtype=int32) tf.Tensor(5, shape=(), dtype=int32) x = 6 x = 7 x = 8 x = 9 tf.Tensor(6, shape=(), dtype=int32) tf.Tensor(7, shape=(), dtype=int32) tf.Tensor(8, shape=(), dtype=int32) tf.Tensor(9, shape=(), dtype=int32) All good so far gen called gen called gen called gen called gen called gen called gen called [log truncated]
The text was updated successfully, but these errors were encountered: