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

Uni-Mol numpy version #262

Open
favor2021 opened this issue Aug 28, 2024 · 3 comments
Open

Uni-Mol numpy version #262

favor2021 opened this issue Aug 28, 2024 · 3 comments

Comments

@favor2021
Copy link

I am facing the issue of

`No other smiles inputs
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
ImportError: numpy.core._multiarray_umath failed to import
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
2024-08-28 14:01:18 | INFO | unicore.distributed.utils | distributed init (rank 0): tcp://localhost:18393
2024-08-28 14:01:18 | INFO | unicore.distributed.utils | distributed init (rank 1): tcp://localhost:18393
2024-08-28 14:01:18 | INFO | torch.distributed.distributed_c10d | Added key: store_based_barrier_key:1 to store for rank: 1
2024-08-28 14:01:18 | INFO | torch.distributed.distributed_c10d | Added key: store_based_barrier_key:1 to store for rank: 0
2024-08-28 14:01:18 | INFO | torch.distributed.distributed_c10d | Rank 0: Completed store-based barrier for key:store_based_barrier_key:1 with 2 nodes.
2024-08-28 14:01:18 | INFO | unicore.distributed.utils | initialized host 27d257810fc0 as rank 0
2024-08-28 14:01:18 | INFO | torch.distributed.distributed_c10d | Rank 1: Completed store-based barrier for key:store_based_barrier_key:1 with 2 nodes.
2024-08-28 14:01:18 | INFO | unicore.distributed.utils | initialized host 27d257810fc0 as rank 1
Traceback (most recent call last):
File "./Uni-Mol/unimol/unimol/infer.py", line 120, in
cli_main()
File "./Uni-Mol/unimol/unimol/infer.py", line 116, in cli_main
distributed_utils.call_main(args, main)
File "/opt/conda/lib/python3.8/site-packages/unicore-0.0.1-py3.8-linux-x86_64.egg/unicore/distributed/utils.py", line 180, in call_main
torch.multiprocessing.spawn(
File "/opt/conda/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 240, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
File "/opt/conda/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 198, in start_processes
while not context.join():
File "/opt/conda/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 160, in join
raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException:

-- Process 0 terminated with the following error:
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 69, in _wrap
fn(i, *args)
File "/opt/conda/lib/python3.8/site-packages/unicore-0.0.1-py3.8-linux-x86_64.egg/unicore/distributed/utils.py", line 158, in distributed_main
args.distributed_rank = distributed_init(args)
File "/opt/conda/lib/python3.8/site-packages/unicore-0.0.1-py3.8-linux-x86_64.egg/unicore/distributed/utils.py", line 138, in distributed_init
dist.all_reduce(torch.zeros(1).cuda())
RuntimeError: CUDA error: out of memory
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
`

It seems to be related to a numpy version problem. I am encountering this issue while trying to run unimol_binding_pose_demo from Uni-Mol. I would appreciate any guidance on how to resolve this.

@ZhouGengmo
Copy link
Collaborator

You can try reinstall numpy

pip uninstall numpy
pip install numpy

And for this, you can use a smaller batch_size.

RuntimeError: CUDA error: out of memory

@favor2021
Copy link
Author

You can try reinstall numpy

pip uninstall numpy
pip install numpy

And for this, you can use a smaller batch_size.

RuntimeError: CUDA error: out of memory

@ZhouGengmo Thank you very much for your attention and response to the problem I am having.
I've tried all of the solutions you've provided and encountered the same error about numpy version, and as for the CUDA issue, I ran the code on a higher capacity GPU and no longer get the error.

@ZhouGengmo
Copy link
Collaborator

Or you can choose to run it in a Docker container.
https://github.com/deepmodeling/Uni-Mol/tree/main/unimol#dependencies

@github-staff github-staff deleted a comment from favor2021 Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@ZhouGengmo @favor2021 and others