-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Key already registered with the same priority: Python #126
Comments
@liangYe10086 did you manage to solve the issue somehow? |
wdb not compatible with pytorch, uninstall all pytorch related packages works for me |
Bump on this issue. I've been seeing the same thing. I did some more debugging and I think I know the cause: I made some progress on debugging this, by getting down into GDB and looking at how the DLLs are being loaded. Using this script: import torch
import wdb
wdb.set_trace()
wdb.start_trace()
print("Hello world") I was able to reproduce Basically the following DLLs were being loaded consecutively:
the first one succeeds, then the second one fails when registering a class to a static (global) registry, since there is already a class with the same name “Python” bound in the registry. This leads me to think that PyTorch expects only one of those two DLLs to be loaded, depending on whether or not I'm using a GPU. Moreover, using this script:
neither of the two DLLs are ever loaded anyway, which is fishy. It means Pytorch probably isn’t the one loading them. I looked into the source for wdb and found it was using a library called import torch
import sys
import importmagic
index = importmagic.SymbolIndex()
index.build_index(sys.path)
print("Hello world")
print(torch.randn(4, 5) @ torch.randn(5, 4)) which is how WDB uses importmagic behind the scenes, the program tries to load both caffe DLLs and results in the “Key already registered with the same priority: Python”, cutting out WDB as a middleman. Therefore, WDB is likely trying to use I don't have a fix for this, but hopefully it gives the maintainers more context. Pytorch 1.6.0 CUDA 10.1
|
A workaround is to:
WDB disables the feature of autoimporting variables that aren't imported in the python console if |
when i run command line " python -m wdb your_file.py " in a docker ,the program exit with the following infomation .
Key already registered with the same priority: Python
dose anyone see the similar problem ?
The text was updated successfully, but these errors were encountered: