video2dataset
video2dataset copied to clipboard
Default process group has not been initialized, please make sure to call init_process_group.
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.
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?
https://github.com/iejMac/video2dataset/blob/08297c6f3e124845deda75e5194863391543f124/video2dataset/dataloader/custom_wds.py#L510