AdelaiDet
AdelaiDet copied to clipboard
RuntimeError: Default process group has not been initialized, please make sure to call init_process_group.
when I use single GPU, the ABC will produce the error,
I find the answer on the Internet,
it's the reason that ABC use the synbatchnorm,
So,
when use the single GPU,
you need to init the process_group,
maybe you can updata the code to main
————————————————————
—————————————————————— cuda_num = os.environ['CUDA_VISIBLE_DEVICES'] cuda_num_list = list(cuda_num.split(",")) if len(cuda_num_list) == 1: import torch.distributed as dist
dist.init_process_group(backend='nccl', init_method='tcp://localhost:23456', rank=0, world_size=1)
print("already init\n")
Update the solution worked on colab cuda_num = os.environ['CUDA_VISIBLE_DEVICES'] casue keyerrors so i manually changed cuda_num="0"
cuda_num_list = list(cuda_num.split(",")) if len(cuda_num_list) == 1: import torch.distributed as dist