-
Notifications
You must be signed in to change notification settings - Fork 409
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
OWL-ViT playground imports #1043
Comments
What's your version of numpy? |
Getting the same error. I used to restart the kernel after installing dependencies on colab and it used to work. But now after running the first cell and restarting the kernel. Getting the below error - AttributeError: module 'jax.random' has no attribute 'PRNGKeyArray' Numpy version: Version: 1.26.4 Can someone please make the docker file or something? I have never been successful in installing it on my local machine. |
Encountered this issue as well in Colab. Seems similar to numpy/numpy#25150 Running the first notebook cell:
results in the following python environment:
Indicating that the version of numpy installed should be |
You can try to change PRNGKeyArray to PRNGKey. It worked for me. |
@Chi-chicken Can you please clarify how to do that? Thank you. I checked my jax.random file on local machine. It doesn't contain PRNGKeyArray. Only PRNGKey. Attached is my jax.random python file in conda directory. And the full error while importing - from scenic.projects.owl_vit import models WARNING:absl:Type handler registry overriding type "<class 'float'>" collision on scalar AttributeError Traceback (most recent call last) File ~/Downloads/owl_vit/scenic/scenic/projects/owl_vit/models.py:26 File ~/Downloads/owl_vit/scenic/scenic/projects/owl_vit/matching_base_models.py:23 File ~/Downloads/owl_vit/scenic/scenic/model_lib/matchers/init.py:25 File ~/Downloads/owl_vit/scenic/scenic/model_lib/matchers/sinkhorn.py:24 File ~/anaconda3/envs/owl_vit/lib/python3.10/site-packages/ott/init.py:15 File ~/anaconda3/envs/owl_vit/lib/python3.10/site-packages/ott/initializers/init.py:1 File ~/anaconda3/envs/owl_vit/lib/python3.10/site-packages/ott/initializers/nn/init.py:1 File ~/anaconda3/envs/owl_vit/lib/python3.10/site-packages/ott/initializers/nn/initializers.py:21 File ~/anaconda3/envs/owl_vit/lib/python3.10/site-packages/ott/initializers/nn/initializers.py:64, in MetaInitializer() File ~/anaconda3/envs/owl_vit/lib/python3.10/site-packages/jax/_src/deprecations.py:54, in deprecation_getattr..getattr(name) AttributeError: module 'jax.random' has no attribute 'PRNGKeyArray' |
@DishantMewada You can try to change PRNGKeyArray to PRNGKey in the initializers.py file. |
@Chi-chicken Thank you for the reply. Can you please tell where is the file and what did you change in it? |
@DishantMewada The file path: ~/anaconda3/envs/owl_vit/lib/python3.10/site-packages/ott/initializers/nn/initializers.py |
You are such a saviour @Chi-chicken. Thank you so much. It is working on my local machine. I know the original question from @kaninaba94 was related to Google Colab. But still, I confirm that this method works for the local machine if you have the same dependencies as me. |
This is using T4 GPU runtime. All the installs ran successfully, but the second cell failed:
The text was updated successfully, but these errors were encountered: