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

AttributeError: module 'numpy.typing' has no attribute 'NDArray' #135

Closed
nikhilsos opened this issue Aug 1, 2024 · 3 comments
Closed

AttributeError: module 'numpy.typing' has no attribute 'NDArray' #135

nikhilsos opened this issue Aug 1, 2024 · 3 comments

Comments

@nikhilsos
Copy link

Firstly, using cuda 10.1, requirement does not work as it is
Needed to install via:

pip install torch==1.8.1+cu101 torchvision==0.9.1+cu101 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

After that tried running: src/model/ast_models.py
got :
AttributeError: module 'numpy.typing' has no attribute 'NDArray'

@nikhilsos
Copy link
Author

Firstly, using cuda 10.1, requirement does not work as it is Needed to install via:

pip install torch==1.8.1+cu101 torchvision==0.9.1+cu101 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

After that tried running: src/model/ast_models.py got : AttributeError: module 'numpy.typing' has no attribute 'NDArray'

Update:
worked after relaxing numpy to < 1.23.0 (1.22.4)

@YuanGongND
Copy link
Owner

@nikhilsos thanks so much for sharing and sorry for the version issue.

numpy to < 1.23.0 (1.22.4) is this a relaxing or constrain? It is a known issue that numpy has a change after this version.

-Yuan

@nikhilsos
Copy link
Author

nikhilsos commented Aug 1, 2024

@YuanGongND constraining it is, pardon my mistake. I said the exact opposite. I had no idea about that numpy change, I am relatively new to this.

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