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

Default process group has not been initialized, please make sure to call init_process_group. #314

Open
rohit901 opened this issue Feb 15, 2024 · 1 comment

Comments

@rohit901
Copy link

rohit901 commented Feb 15, 2024

Hello,

I wanted to run the example dataloader script shown here: https://github.com/iejMac/video2dataset/blob/main/examples/dataloader_example.py

I'm running on a single GPU, and I'm getting this error. I think its related to distributed data parallel? How can I fix it?
I just want to explore the dataloader/dataset on my jupyter notebook first, thus I don't require distributed mechanism.

I've installed the library from source.

Error logs:

Traceback (most recent call last):
  File "/home/rohit.bharadwaj/Projects/Diffusion/Research/LCM/our-project-code/experiments/test.py", line 16, in <module>
    dset = get_video_dataset(
           ^^^^^^^^^^^^^^^^^^
  File "/home/rohit.bharadwaj/packages/vid2dataset/video2dataset/dataloader/dataloader.py", line 155, in get_video_dataset
    dset = dataset_cls(urls, shardshuffle=shuffle, handler=handler)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rohit.bharadwaj/packages/vid2dataset/video2dataset/dataloader/custom_wds.py", line 505, in __init__
    global_rank = dist.get_rank()
                  ^^^^^^^^^^^^^^^
  File "/home/rohit.bharadwaj/.conda/envs/LCM/lib/python3.11/site-packages/torch/distributed/distributed_c10d.py", line 1532, in get_rank
    default_pg = _get_default_group()
                 ^^^^^^^^^^^^^^^^^^^^
  File "/home/rohit.bharadwaj/.conda/envs/LCM/lib/python3.11/site-packages/torch/distributed/distributed_c10d.py", line 977, in _get_default_group
    raise ValueError(
ValueError: Default process group has not been initialized, please make sure to call init_process_group.
@rohit901
Copy link
Author

So, I made a change in this except block to except Exception as e:, and it did fix the problem. I think it needs to be changed in the source as well?

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

1 participant