tf.io.read_file loads indefinitely #52587
Labels
comp:ops
OPs related issues
stat:awaiting tensorflower
Status - Awaiting response from tensorflower
TF 2.9
Issues found in the TF 2.9 release (or RCs)
type:bug
Bug
Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information
v2.4.0-49-g85c8b2a817f 2.4.1
3.8.5
You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with:
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the current behavior
Splitting a Dataset and then reading the first item of the Validation Dataset loads indefinitely.
Calling
next(iter(train_dataset .take(1)))
works callingnext(iter(val_dataset .take(1)))
loads indefinitely.Describe the expected behavior
I want my Validation Dataset to just return Data as expected.
Contributing
Standalone code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/Jupyter/any notebook.
Other info / logs Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.
Notebook, that Produces the Issue: https://colab.research.google.com/drive/1w5RQDp6W3Zyu4p1kEBRlHT2Vl9zvxVOk?usp=sharing
Stackoverflow Post: https://stackoverflow.com/questions/69634758/reading-validation-dataset-takes-indefinitely-long
The Problem is withing
prep_image
, when i just return the Filename without opening the Data everything works as expected:If i just return the Output of
tf.io.read_file
the first item of the Validation-Dataset already loads indefinitely:Edit:// Loading the First Train-Dataset Item Takes:
0:00:00.063014
HH:MM:SS:ms
and getting the first Validation item takes:
0:31:09.717694
The text was updated successfully, but these errors were encountered: