New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DistributedDatasetInterface is not an attribute of input_lib - engine\data_adapter.py #61215
Comments
this is the same error I had: AttributeError: module 'tensorflow.python.distribute.input_lib' has no attribute 'DistributedDatasetInterface'. This error comes up even when I try model.fit and any other operation with the model beyond its compile line. |
I've solved it by replacing DistributedDatasetInterface by DistributedDatasetSpec right on:
This is what I did:
Definetely not a good practice, I know, but... |
do you have any update if input_lib.DistributedDatasetSpec carries same functionality as input_lib.DistributedDatasetInterface ? |
@samuelsennev, Please remove any import of tensorflow.python.keras and use the public API with from tensorflow import keras or import tensorflow as tf; tf.keras. I tried to execute the mentioned code on tensorflow v2.13 by using below imports and it was executed without any issues.
Kindly find the gist of it here. Thank you! |
@tilakrayal Worked with the public API and from tensorflow import keras Thanks ;) |
The model selection portion of the example does not run without this fix. Only applies to tensorflow version >2.12. The dependency of this library specified version >2.10 for tensorflow. More information here: tensorflow/tensorflow#61215
it does works! |
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
No
Source
source
TensorFlow version
2.13
Custom code
No
OS platform and distribution
No response
Mobile device
No response
Python version
3.10.9
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
I'm new to machine learning and I was setting up this network with just one layer, with only one neuron inside it, just to see how it works. Setting up went fine. The error occured when I asked it to predict.
I'm not sure what exactly happend, but apparently, a non existent attribute (
input_lib.DistributedDatasetInterface
) was passed toisinstance()
in the file: ...\site-packages\tensorflow\python\keras\engine\data_adapter.py (line 1699).I've replaced by the wrong one by the one suggested and worked as expected.
Standalone code to reproduce the issue
Relevant log output
The text was updated successfully, but these errors were encountered: