Skip to content
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

No module named 'keras.src.engine' #19677

Open
UmerElsaharty opened this issue May 6, 2024 · 8 comments
Open

No module named 'keras.src.engine' #19677

UmerElsaharty opened this issue May 6, 2024 · 8 comments

Comments

@UmerElsaharty
Copy link

i got the error in the title while importing libraries for training my Vit model , i tried to install vit_keras , tensorflow_addons , keras-nightly and made sure that the KERAS_BACKEND environment variable is set to "tensorflow". and still shows up
i train my model on kaggle .

@sachinprasadhs
Copy link
Collaborator

@UmerElsaharty , Could you please provide the reproducible code.

vit_keras is not released by Keras team, you can probably reach out to the author mentioned in the PyPi page of package.

@UmerElsaharty
Copy link
Author

UmerElsaharty commented May 6, 2024

sure here is the code :

https://github.com/xRedik/Master_Thesis/blob/main/code/model/VIT/VIT_model.ipynb

it's running well on colab , i dont know why this happened on kaggle

@sachinprasadhs
Copy link
Collaborator

Could you please upgrade the Keras version using pip install -U keras and use the keras import directly as import keras, which uses latest Keras.

@UmerElsaharty
Copy link
Author

UmerElsaharty commented May 7, 2024

the error is still there , a message has been shown to me saying that the pip cant install some components of the packages
can this has a relation with the error ? and here is the message:
"ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
ydata-profiling 4.6.4 requires numpy<1.26,>=1.16.0, but you have numpy 1.26.4 which is incompatible.
ydata-profiling 4.6.4 requires typeguard<5,>=4.1.2, but you have typeguard 2.13.3 which is incompatible."

@sachinprasadhs
Copy link
Collaborator

You need to maually resolve those version conflict dependency, but I don't think the error is due to Keras, check with vit_keras, which we are not releasing.

@UmerElsaharty
Copy link
Author

i think the issue is with kaggle itself because the code is running so well on google colab , could you please tell me recommendation of how to check with vit_keras !

@sachinprasadhs
Copy link
Collaborator

You can contact author mentioned in the page here https://pypi.org/project/keras-vit/ and close thew issue here. Thanks!

Copy link

This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants