Closed ashrafbadalof closed 1 year ago
I am having the same issue!
I'm guessing you're running it in Windows? I had hit this when trying to resolve the issue No module named 'resource'
and going through the Stack Overflow recommendation. That recommendation might be a bit off I think.
I believe this has been fixed now, but the fix hasn't yet been released, in commit https://github.com/tensorflow/datasets/commit/82215c7cf4b3e6df706a72c9b7ad8cede09f4d84
If you update your shuffle.py
(mine's located in venv\Lib\site-packages\tensorflow_datasets\core\shuffle.py
) with the changes in that commit, it should go through.
Sorry to hear about your problem.
The fix is yet to be released, but is already available in tfds-nightly
.
Could you try using pip install --upgrade --force-reinstall tfds-nightly
?
how to use tfds-nightly
build? same as tensorflow_datasets
- import tfds-nightly as tfds
?
No, after installing tfds-nightly
package you continue using TFDS normally, i.e. import tensorflow_datasets as tfds
.
No, after installing
tfds-nightly
package you continue using TFDS normally, i.e.import tensorflow_datasets as tfds
.
Hmm.. But I'm still getting ImportError: cannot import name 'core' from partially initialized module 'tensorflow_datasets' (most likely due to a circular import) (C:\Users\aak\venv\lib\site-packages\tensorflow_datasets\__init__.py)
Could you please share the full error log?
Could you please share the full error log?
sure
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[4], line 2
1 import tensorflow as tf
----> 2 import tensorflow_datasets as tfds
File ~\Desktop\venv\lib\site-packages\tensorflow_datasets\__init__.py:43
41 _TIMESTAMP_IMPORT_STARTS = time.time()
42 from absl import logging
---> 43 import tensorflow_datasets.core.logging as _tfds_logging
44 from tensorflow_datasets.core.logging import call_metadata as _call_metadata
46 _metadata = _call_metadata.CallMetadata()
ImportError: cannot import name 'core' from partially initialized module 'tensorflow_datasets' (most likely due to a circular import) (C:\Users\aak\Desktop\venv\lib\site-packages\tensorflow_datasets\__init__.py)
I've just updated tfds, btw
Do you have a traceback in your error log?
I am also going through the exact same problem, is there any update on solution.
@mriganksoni have you tried using the most recent tfds-nightly
package? If so, could you share a traceback for your error?
hi, i tried installing tfds nightly using pip install tfds-nightly --no-cache-dir --force-reinstall --upgrade
and it then it worked.
I haI have the same problem. And if I want to fix it with pip install tfds-nightly --no-cache-dir --force-reinstall --upgrade
it installs it. But this led to an upgraded version of tensorboard which is not compatible with tensorflow.
I'm using Tensorflow 2.10 for GPU support. Is this not compatible with Tensorflow_Datasets ?
Does someone have some advice for me?
@ItsVanior tensorflow-datasets
requires tensorflow>=2.1
and doesn't restrict your tensorboard version, so feel free to downgrade it if necessary.
My bad. I forgot to write that Protobuf get an upgrade as well, which is not compatible with tensorflow.
@ItsVanior tensorflow-datasets
requires protobuf>=3.20
. You should handle all other dependency versions yourself.
What's the plan for releasing a bug fix version that includes this?
Is there any update for the release to fix this bug?
I have the same issue when trying to import keras_cv First of all I notice a message that No module named 'resource' when trying to import this library from shuffle.py.
I looked for a solution and when executing "pip install resource" or modifiying the shuffle.py to add code with exception (see https://github.com/tensorflow/datasets/commit/82215c7cf4b3e6df706a72c9b7ad8cede09f4d84) then I noticed a (i think) worst issue because import tensorflow_datasets.core.logging as _tfds_logging then fails (and it previosly didn't do.
I am not familiar with this IDE as I started with GoogleColab notebooks but I wanted to move to a more "local" enviroment but I am on hold...
I have done the "pip install tfds-nightly --no-cache-dir --force-reinstall --upgrade" but I recieved the next ERROR
And still I have the same problem to import tensorflow_datasets ImportError: cannot import name 'core' from partially initialized module 'tensorflow_datasets' (most likely due to a circular import) (C:\Users\ASUS\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_datasetsinit.py)
What I need help with / What I was wondering ImportError: cannot import name 'core' from partially initialized module 'tensorflow_datasets' (most likely due to a circular import) (C:\Users\ASUS\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_datasets__init__.py) Encountering with this issue
What I've tried so far I tried nearly everything, i uninstalled and then installed again, created new environment but didn't work out
It would be nice if... Could we have done anything to make things better (documentation, etc.)?
Environment information (if applicable)
tensorflow-datasets
/tfds-nightly
version: 4.9.3tensorflow
/tensorflow-gpu
/tf-nightly
/tf-nightly-gpu
version: