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 'torch.distributed' has no attribute '_all_gather_base' #98

Open
codefreakSubham opened this issue Nov 5, 2022 · 6 comments

Comments

@codefreakSubham
Copy link

While running extract_features.py facing the following error:

File "/lfs/usrhome/ms/cs21s058/.conda/envs/caption/lib/python3.7/site-packages/apex-0.1-py3.7.egg/apex/transformer/utils.py", line 11, in
AttributeError: module 'torch.distributed' has no attribute '_all_gather_base'

Pytorch version : 1.5.1
CUDA: 10.1
Python 3.7

Anyone please help me out with this issue.

@SDWDD
Copy link

SDWDD commented Nov 7, 2022

I have also encountered this problem, please let me know if there is a solution

@tzcskys
Copy link

tzcskys commented Nov 15, 2022

I have met the same problem

@tzcskys
Copy link

tzcskys commented Nov 16, 2022

I have met the same problem

found the solution, the newest apex (master branch) is not compatible with the old torch version, change to some of older branches e.g. 22.04-dev and it will work. refer to here

@184446223
Copy link

you can use:

pip uninstall apex
rm -rf apex
git clone https://github.com/ptrblck/apex.git
cd apex
git checkout apex_no_distributed
pip install -v --no-cache-dir ./

it can sovle my problem,and it can work well.

@hundun0322
Copy link

Jetson AGX Xavier
Jetpack: 4.6
Pytorch version: 1.7.0
CUDA: 10.2
Python: 3.6
The above solutions don't fit me.But I succeed after commenting out the related codes in files.

@lxy51
Copy link

lxy51 commented Apr 26, 2024

您可以使用:

pip uninstall apex
rm -rf apex
git clone https://github.com/ptrblck/apex.git
cd apex
git checkout apex_no_distributed
pip install -v --no-cache-dir ./

它可以解决我的问题,而且效果很好。

ImportError: cannot import name 'container_abcs' from 'torch._six' (/root/data1/lxy/envs/python38/lib/python3.8/site-packages/torch/_six.py)

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

6 participants