From 353985c438ff352f602338a021c41bae1e8623fb Mon Sep 17 00:00:00 2001 From: HinGwenWoong Date: Fri, 2 Dec 2022 16:17:07 +0800 Subject: [PATCH] [Fix] Fix stuck in `torch.einsum` when create dataset (#2065) * Fix stuck in torch.einsum when create dataset * Fix stuck in torch.einsum when create dataset * Fix lint * add comments * Fix lint --- tools/create_data.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/create_data.py b/tools/create_data.py index f2012d931..33f68bfe4 100644 --- a/tools/create_data.py +++ b/tools/create_data.py @@ -256,6 +256,11 @@ def waymo_data_prep(root_path, if __name__ == '__main__': from mmdet3d.utils import register_all_modules register_all_modules() + + # Set to spawn mode to avoid stuck when process dataset creating + import multiprocessing + multiprocessing.set_start_method('spawn') + if args.dataset == 'kitti': kitti_data_prep( root_path=args.root_path,