-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
Short description
dataset_builder._prepare_split throws tensorflow.python.framework.errors_impl.ResourceExhaustedError; Too many open files when used on imagenet_resized 64x64.
Environment information
- Operating System: linux with user privileges, so not possible to change the Python upperbound for number of open files
- Python version:3.6.7
- tensorflow-datasets version: 1.3.2, but the same function exists in 2.0.0 so I suspect the error is also there
- tensorflow-gpu version: 1.15
Reproduction instructions
import tensorflow_datasets as tfds
data = tfds.load(name="imagenet_resized", split="train", builder_kwargs={'config':'64x64'})
Link to logs
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/file_format_adapter.py", line 199, in incomplete_dir
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/dataset_builder.py", line 322, in download_and_prepare
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/dataset_builder.py", line 969, in _download_and_prepare
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/dataset_builder.py", line 837, in _download_and_prepare
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/dataset_builder.py", line 996, in _prepare_split
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/tfrecords_writer.py", line 160, in write
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/shuffle.py", line 194, in add
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/shuffle.py", line 180, in _add_to_mem_buffer
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/shuffle.py", line 174, in _add_to_bucket
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/shuffle.py", line 109, in add
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 106, in write
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 92, in _prewrite_check
tensorflow.python.framework.errors_impl.ResourceExhaustedError: /home/pxd256/tensorflow_datasets/imagenet_resized/64x64/0.1.0.incomplete3CQMFQ/bucket_b6b3f07c-ee6c-4cab-aac4-b9dde31f24c6_717.tmp; Too many open files
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/api_utils.py", line 52, in disallow_positional_args_dec
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/registered.py", line 302, in load
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/api_utils.py", line 52, in disallow_positional_args_dec
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/dataset_builder.py", line 342, in download_and_prepare
File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow_datasets/core/file_format_adapter.py", line 203, in incomplete_dir
File "/home/pxd256/.local/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 569, in delete_recursively_v2
tensorflow.python.framework.errors_impl.ResourceExhaustedError: /home/pxd256/tensorflow_datasets/imagenet_resized/64x64/0.1.0.incomplete3CQMFQ; Too many open files
126393 examples [05:00, 472.55 examples/s]
Expected behavior
Not throwing exception.
Baschdl, deepentropy, jiminsun, polaschwoebel, bbreton3 and 2 more