-
Notifications
You must be signed in to change notification settings - Fork 10
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
ModuleNotFoundError: No module named 'keras_cv_attention_models.maxvit' #12
Comments
Hello Lukas, Concerning the error, I am currently utilizing the (remarkable) work of @leondgarse:
and a line of the README file specifies what could potentially be the cause of the issue: As for myself, I have not encountered any problems, as demonstrated by the following output:
I am wondering if the version of TensorFlow or Python that you are using (perhaps on Codecov?) is the issue. What do you think? Please feel free to contact me by email at [email protected]. |
Ya, the package name for pip install is |
Yeh, that was my hunch. |
Thanks for your response Thomas! If you're interested, I can add you to the Regarding the error message: I don't think that it has something to do with the TensorFlow version. That wouldn't make any sense. Otherwise @leondgarse would not have phrased it as a recommendation -- "especially for training" -- rather than a necessity. It appears that the package is not installed correctly which should not depend on the TensorFlow version, at least not for versions that aren't very different from the recommended version. If that's really the case though, then this has to be explicitly stated in the description of the We can try to change the TensorFlow version and run the tests again on our end, but my hunch is that it won't fix the problem. |
A quick heads up: changing the TensorFlow version on our end does not resolve the error. |
Thanks everyone, should be updated on pipy ! :) |
Unfortunately, this does not fix the error. I still get the following error message File "/Users/runner/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/harmonization/__init__.py", line 13, in <module>
from . import models
File "/Users/runner/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/harmonization/models/__init__.py", line 11, in <module>
from .maxvit import load_tiny_MaxViT
File "/Users/runner/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/harmonization/models/maxvit.py", line 6, in <module>
from keras_cv_attention_models.maxvit import MaxViT_Tiny
ModuleNotFoundError: No module named 'keras_cv_attention_models.maxvit' |
Ok, I could finally figure out what the problem is. The problem is caused by the from keras_cv_attention_models.maxvit import MaxViT_Tiny then I get the following error message: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'keras_cv_attention_models.maxvit' When I try to import the from keras_cv_attention_models import maxvit I get the following message:
However, when I try to import from keras_cv_attention_models.levit import LeViT128 then everything works just fine and I see no error message. So, it seems as if something goes wrong with |
As we discussed here #112, should specify |
I've just submitted a PR that does that. |
@leondgarse, should we specify the tensorflow version as well or keep it unspecified? |
I didn't specify TF version in my package, as there even someone using it in |
I get the following error for any ERROR: Could not find a version that satisfies the requirement tensorflow-macos; platform_system == "Darwin" (from keras-cv-attention-models) (from versions: none)
ERROR: No matching distribution found for tensorflow-macos; platform_system == "Darwin" It works fine though for any version below |
I am currently trying to add your models to the
thingsvision
toolbox, but we keep getting the following error message:From this commit I can infer that you've added
MaxViT
only recently. Did you actually test whether the imports work as expected? From what I can see here is that you need to usekeras-cv-attention-models
rather thankeras_cv_attention_models
when installing the module via pip. However, I am not 100% sure whether that's the issue. You can find the PR that is trying to add your models to thethingsvision
toolbox here.The text was updated successfully, but these errors were encountered: