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

Numpy incomptable issue #84

Closed
bzha5848 opened this issue Jul 24, 2023 · 13 comments
Closed

Numpy incomptable issue #84

bzha5848 opened this issue Jul 24, 2023 · 13 comments

Comments

@bzha5848
Copy link

Hello here,

I'm currently having issues with training and evaluating code. I follow the installation guide and set the env, but when I was trying evaluating the data, I got error:
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 36672) of binary: /home/me/miniconda3/envs/uniad/bin/python

I don't know what's happening, but I suspect it might be incompatibility issues, as when I install the environment for UniAD I saw this error:

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.
d2l 0.17.6 requires numpy==1.21.5, but you have numpy 1.24.4 which is incompatible.
onnx 1.12.0 requires protobuf<=3.20.1,>=3.12.2, but you have protobuf 4.23.4 which is incompatible.
mmdet3d 0.17.1 requires numpy<1.20.0, but you have numpy 1.24.4 which is incompatible.

Just wondering how to fix these errors?

Thanks so much!!

@ilnehc
Copy link
Contributor

ilnehc commented Jul 24, 2023

@bzha5848 Hi, could you provide the full error log? The multiprocessing failure is sometimes caused by package import errors.

@YTEP-ZHI
Copy link
Collaborator

YTEP-ZHI commented Jul 25, 2023

@bzha5848 Hi, it seems that your numpy version is 1.24.4. You should install numpy==1.20.0, which is required by the evaluation of tracking, as is listed in https://github.com/OpenDriveLab/UniAD/blob/main/requirements.txt.

@bzha5848
Copy link
Author

bzha5848 commented Jul 28, 2023

@bzha5848 Hi, could you provide the full error log? The multiprocessing failure is sometimes caused by package import errors.

That's my error:
ImportError: numpy.core.multiarray failed to import

and:
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:


     ./tools/test.py FAILED        

=======================================
Root Cause:
[0]:
time: 2023-07-28_10:16:56
rank: 0 (local_rank: 0)
exitcode: 1 (pid: 42499)
error_file: <N/A>
msg: "Process failed with exitcode 1"

Other Failures:
<NO_OTHER_FAILURES>


@YTEP-ZHI
Copy link
Collaborator

ImportError: numpy.core.multiarray failed to import
@bzha5848 As I mentioned, it's caused by incompatible numpy version. You should try to install numpy==1.20.0 .

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.
Moreover, the dependency error could be simply ignored.

@YTEP-ZHI YTEP-ZHI pinned this issue Aug 3, 2023
@YTEP-ZHI YTEP-ZHI closed this as completed Aug 3, 2023
@YTEP-ZHI YTEP-ZHI assigned YTEP-ZHI and unassigned YTEP-ZHI Aug 3, 2023
@wutianze
Copy link

I met another problem related to numpy:
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.
mmdet3d 0.17.1 requires numpy<1.20.0, but you have numpy 1.20.0 which is incompatible.

Seems like the mmdet3d and UniAD use incompatible numpy

@thunguyenth
Copy link

@wutianze Hi, I got the same problem of numpy version incompatible between numpy==1.20.0 (in requirement.txt) and numpy<1.20.0 in mmdet3d). Did you solve this problem?

@wayneguo1002
Copy link

@wutianze Hi, I got the same problem of numpy version incompatible between numpy==1.20.0 (in requirement.txt) and numpy<1.20.0 in mmdet3d). Did you solve this problem?
Same problem here, @wutianze @YTEP-ZHI. How could we fix this problem?

@thunguyenth
Copy link

@wayneguo1002 Hi, I remember that I solved this problem by changing the installation order of mmdet3d and numpy.
This is the order that I remember (as mentioned in the Instaltion guideline), if it doesn't work, then please try installing them in reverse order.

  1. Install mmdet3d - [version: 0.17.1] - [build: dev_0] - [channel: < develop >]
  2. Install numpy - [version: 1.20.0] - [build: pypi_0] - [channel: pypi]

I hope this helps.

@Feng-Shilong
Copy link

@wutianze Hi, I got the same problem of numpy version incompatible between numpy==1.20.0 (in requirement.txt) and numpy<1.20.0 in mmdet3d). Did you solve this problem?

I also encountered the same problem, how should I solve it? @thunguyenth @wayneguo1002 @wutianze

@wayneguo1002
Copy link

@wutianze Hi, I got the same problem of numpy version incompatible between numpy==1.20.0 (in requirement.txt) and numpy<1.20.0 in mmdet3d). Did you solve this problem?

I also encountered the same problem, how should I solve it? @thunguyenth @wayneguo1002 @wutianze

According to my experience, you should use lower numpy version to meet the requirements of mmdet3d. Then you can install the required numpy version. For any package that requires a higher version of numpy than mmdet3d, you should install it after installing mmdet3d, because in my experience, the configuration instructions in the official documentation are not completely correct, at least not for everyone. Finally, check whether your various packages meet the requirements of the official configuration file.

@wayneguo1002
Copy link

@wayneguo1002 Hi, I remember that I solved this problem by changing the installation order of mmdet3d and numpy. This is the order that I remember (as mentioned in the Instaltion guideline), if it doesn't work, then please try installing them in reverse order.

  1. Install mmdet3d - [version: 0.17.1] - [build: dev_0] - [channel: < develop >]
  2. Install numpy - [version: 1.20.0] - [build: pypi_0] - [channel: pypi]

I hope this helps.

Thanks it helped a lot ^_^

@Feng-Shilong
Copy link

@wutianze Hi, I got the same problem of numpy version incompatible between numpy==1.20.0 (in requirement.txt) and numpy<1.20.0 in mmdet3d). Did you solve this problem?

I also encountered the same problem, how should I solve it? @thunguyenth @wayneguo1002 @wutianze

According to my experience, you should use lower numpy version to meet the requirements of mmdet3d. Then you can install the required numpy version. For any package that requires a higher version of numpy than mmdet3d, you should install it after installing mmdet3d, because in my experience, the configuration instructions in the official documentation are not completely correct, at least not for everyone. Finally, check whether your various packages meet the requirements of the official configuration file.

Thanks, it helpes me a lot~

@Gigalomanicx
Copy link

I met another problem related to numpy: 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. mmdet3d 0.17.1 requires numpy<1.20.0, but you have numpy 1.20.0 which is incompatible.

Seems like the mmdet3d and UniAD use incompatible numpy

I encountered the same issue, and I chose to upgrade numpy to version 1.21.0, which resolved the problem. At least now it can evaluate correctly.

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

8 participants