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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name 'ProcessGroup' from 'torch.distributed' #83271

Open
darren-pei opened this issue Aug 11, 2022 · 2 comments
Open

cannot import name 'ProcessGroup' from 'torch.distributed' #83271

darren-pei opened this issue Aug 11, 2022 · 2 comments
Labels
module: macos Mac OS related issues oncall: distributed Add this issue/PR to distributed oncall triage queue triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@darren-pei
Copy link

darren-pei commented Aug 11, 2022

馃悰 Describe the bug

Can't import 'ProcessGroup' from 'torch.distributed'

from torch.distributed import ProcessGroup

Generates:

Traceback (most recent call last): File "/Users/darrenthorpe/PycharmProjects/tableDetection/scripts/bug_report.py", line 1, in <module> from torch.distributed import ProcessGroup ImportError: cannot import name 'ProcessGroup' from 'torch.distributed' (/Users/darrenthorpe/miniforge3/envs/torch-bug/lib/python3.9/site-packages/torch/distributed/__init__.py)

This is doing my head in..... feel like there's something trivial and silly going on.

Note I'm on MacOS with mps 12.5 Monterey

Versions

(torch-bug) darrenthorpe@Darrens-MacBook-Air torch-bug % python collect_env.py

Collecting environment information...
PyTorch version: 1.12.1
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.5 (arm64)
GCC version: Could not collect
Clang version: 13.1.6 (clang-1316.0.21.2.5)
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:00:33) [Clang 13.0.1 ] (64-bit runtime)
Python platform: macOS-12.5-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.23.1
[pip3] torch==1.12.1
[pip3] torchaudio==0.12.1
[pip3] torchvision==0.12.0a0
[conda] numpy 1.23.1 py39h7df2422_0 conda-forge
[conda] pytorch 1.12.1 cpu_py39h0768760_0 conda-forge
[conda] torchaudio 0.12.1 py39_cpu pytorch
[conda] torchvision 0.12.0 cpu_py39h384c48c_1 conda-forge

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @kwen2501 @malfet @albanD

@facebook-github-bot facebook-github-bot added the oncall: distributed Add this issue/PR to distributed oncall triage queue label Aug 11, 2022
@rohan-varma
Copy link
Member

Seems like the same issue as #68385.

@malfet @janeyx99 @seemethere do we have plans to build distributed as part of the M1 PT binaries?

@rohan-varma rohan-varma added triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module module: macos Mac OS related issues labels Aug 12, 2022
@albanD
Copy link
Collaborator

albanD commented Aug 12, 2022

There have been a lot of similar issues before and I really think that we should raise a much nicer error message when trying to use distributed when building without distributed. Random missing function and classes is very confusing as an "error message".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: macos Mac OS related issues oncall: distributed Add this issue/PR to distributed oncall triage queue triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

4 participants