Bug
报错内容
RuntimeError: Default process group has not been initialized, please make sure to call init_process_group.
Traceback (most recent call last):
File "G:\FWQ\PyCharm\PyCharm Community Edition 2022.3.2\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<input>", line 1, in <module>
File "D:\Research\Anaconda3_2019.10\envs\torchcd38\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Research\Anaconda3_2019.10\envs\torchcd38\lib\site-packages\mmcv\cnn\bricks\conv_module.py", line 283, in forward
x = self.norm(x)
File "D:\Research\Anaconda3_2019.10\envs\torchcd38\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Research\Anaconda3_2019.10\envs\torchcd38\lib\site-packages\torch\nn\modules\batchnorm.py", line 731, in forward
world_size = torch.distributed.get_world_size(process_group)
File "D:\Research\Anaconda3_2019.10\envs\torchcd38\lib\site-packages\torch\distributed\distributed_c10d.py", line 762, in get_world_size
return _get_group_size(group)
File "D:\Research\Anaconda3_2019.10\envs\torchcd38\lib\site-packages\torch\distributed\distributed_c10d.py", line 276, in _get_group_size
default_pg = _get_default_group()
File "D:\Research\Anaconda3_2019.10\envs\torchcd38\lib\site-packages\torch\distributed\distributed_c10d.py", line 372, 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.
解决方案
print the config
find all keys that has a value of “SyncBN” or similar
Edit the config file or code to set these values to “BN” instead