Traceback (most recent call last):
File “”, line 1, in 
File “/usr/lib/python3.8/multiprocessing/spawn.py”, line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File “/usr/lib/python3.8/multiprocessing/spawn.py”, line 126, in _main
self = reduction.pickle.load(from_parent)
_pickle.UnpicklingError: pickle data was truncated
Traceback (most recent call last):
File “train_custom.py”, line 398, in 
mp.spawn(init_process, args=(world_size, backend, run), nprocs=world_size, join=True)
File “/usr/local/lib/python3.8/dist-packages/torch/multiprocessing/spawn.py”, line 230, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method=‘spawn’)
File “/usr/local/lib/python3.8/dist-packages/torch/multiprocessing/spawn.py”, line 188, in start_processes
while not context.join():
File “/usr/local/lib/python3.8/dist-packages/torch/multiprocessing/spawn.py”, line 150, in join
raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException:
– Process 0 terminated with the following error:
Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/torch/multiprocessing/spawn.py”, line 59, in _wrap
fn(i, *args)
File “/root/USRGAN_step2/train_custom.py”, line 390, in init_process
fn(rank, size2)
File “/root/USRGAN_step2/train_custom.py”, line 226, in run
for i, batch in enumerate(dataloader):
File “/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py”, line 517, in next
data = self._next_data()
File “/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py”, line 1199, in _next_data
return self._process_data(data)
File “/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py”, line 1225, in _process_data
data.reraise()
File “/usr/local/lib/python3.8/dist-packages/torch/_utils.py”, line 429, in reraise
raise self.exc_type(msg)
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/worker.py”, line 202, in _worker_loop
data = fetcher.fetch(index)
File “/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/fetch.py”, line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File “/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/fetch.py”, line 44, in 
data = [self.dataset[idx] for idx in possibly_batched_index]
File “/root/USRGAN_step2/datasets_S3_2.py”, line 57, in getitem
size = dist.get_world_size()
File “/usr/local/lib/python3.8/dist-packages/torch/distributed/distributed_c10d.py”, line 711, in get_world_size
return _get_group_size(group)
File “/usr/local/lib/python3.8/dist-packages/torch/distributed/distributed_c10d.py”, line 263, in _get_group_size
default_pg = _get_default_group()
File “/usr/local/lib/python3.8/dist-packages/torch/distributed/distributed_c10d.py”, line 347, in _get_default_group
raise RuntimeError("Default process group has not been initialized, "
RuntimeError: Default process group has not been initialized, please make sure to call init_process_group.
That is all of Traceback. And I will review the code again according to your advice. Thank you so much.