Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tensorflow.python.framework.errors_impl.UnknownError: Failed to rename; : Access is denied. ; Input/output error

I am not able to download and load tensorflow dataset on my Windows 10 machine. It works okay on Google colab. Can someone please help me?

Code:

import tensorflow_datasets as tfds

datasets, info = tfds.load("imdb_reviews", as_supervised=True, with_info=True)

When I run this on my local Windows 10 environment, here's the error I get:

....[Output showing I/O progress]...Skipped for concision....

Writing...:   0%|          | 0/2500 [00:00<?, ? examples/s] Shuffling...:  90%|█████████ | 18/20 [00:01<00:00, 14.15 shard/s] Reading...: 0 examples [00:00, ? examples/s]
                                             Writing...:   0%|          | 0/2500 [00:00<?, ? examples/s]
                                                            Reading...: 0 examples [00:00, ? examples/s]
                                             Writing...:   0%|          | 0/2500 [00:00<?, ? examples/s] Traceback (most recent call last):   File "C:\Anaconda3\envs\ml_tf\lib\site-packages\IPython\core\interactiveshell.py", line 3418, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)   File "<ipython-input-2-3b586bfe81d7>", line 3, in <module>
    datasets, info = tfds.load("imdb_reviews", as_supervised=True, with_info=True)   File "C:\Anaconda3\envs\ml_tf\lib\site-packages\tensorflow_datasets\core\api_utils.py", line 52, in disallow_positional_args_dec
    return fn(*args, **kwargs)   File "C:\Anaconda3\envs\ml_tf\lib\site-packages\tensorflow_datasets\core\registered.py", line 300, in load
    dbuilder.download_and_prepare(**download_and_prepare_kwargs)   File "C:\Anaconda3\envs\ml_tf\lib\site-packages\tensorflow_datasets\core\api_utils.py", line 52, in disallow_positional_args_dec
    return fn(*args, **kwargs)   File "C:\Anaconda3\envs\ml_tf\lib\site-packages\tensorflow_datasets\core\dataset_builder.py", line 307, in download_and_prepare
    self.info.write_to_directory(self._data_dir)   File "C:\Anaconda3\envs\ml_tf\lib\contextlib.py", line 119, in __exit__
    next(self.gen)   File "C:\Anaconda3\envs\ml_tf\lib\site-packages\tensorflow_datasets\core\file_format_adapter.py", line 200, in incomplete_dir
    tf.io.gfile.rename(tmp_dir, dirname)   File "C:\Anaconda3\envs\ml_tf\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 546, in rename_v2
    compat.as_bytes(src), compat.as_bytes(dst), overwrite) tensorflow.python.framework.errors_impl.UnknownError: Failed to rename: C:\Users\User\tensorflow_datasets\imdb_reviews\plain_text\0.1.0.incomplete5JQVCL to: C:\Users\User\tensorflow_datasets\imdb_reviews\plain_text\0.1.0 : Access is denied. ; Input/output error

Here's what I tried to fix this:

  1. Uninstalled Conda environment and reinstalled it. Nothing happened.
  2. Ran PyCharm using Admin rights. Nothing happened.

It seems people have raised similar issue, but there has been no response. tensorflow.python.framework.errors_impl.UnknownError: Failed to rename: Input/output error

Can someone please help?

like image 694
watchtower Avatar asked Jun 17 '26 19:06

watchtower


1 Answers

Had this issues and upgrading the tensorflow-datasets solved this

pip install -U tensorflow-datasets

this will replace the tensorflow-datasets-1.2.0 and install tensorflow-datasets-4.2.0

working on windows 10

like image 109
VikasKM Avatar answered Jun 20 '26 07:06

VikasKM



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!