IDEA-Research / DINO

[ICLR 2023] Official implementation of the paper "DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection"
Apache License 2.0
2.19k stars 243 forks source link

RuntimeError: Couldn't open shared event: <000002CE51E18662>, error code: <2> #174

Open Hezey opened 1 year ago

Hezey commented 1 year ago

When I run main.py , the program has a bug What can i do and what is the problem?

Traceback (most recent call last): File "D:\JetBrains\Pycharm_Project\Traffic_Light_Detection\DINO\main.py", line 389, in main(args) File "D:\JetBrains\Pycharm_Project\Traffic_Light_Detection\DINO\main.py", line 273, in main train_stats = train_one_epoch( File "D:\JetBrains\Pycharm_Project\Traffic_Light_Detection\DINO\engine.py", line 41, in train_one_epoch for samples, targets in metric_logger.log_every(data_loader, print_freq, header, logger=logger): File "D:\JetBrains\Pycharm_Project\Traffic_Light_Detection\DINO\util\misc.py", line 238, in log_every for obj in iterable: File "D:\Anaconda3\envs\DINO\lib\site-packages\torch\utils\data\dataloader.py", line 517, in next data = self._next_data() File "D:\Anaconda3\envs\DINO\lib\site-packages\torch\utils\data\dataloader.py", line 1182, in _next_data idx, data = self._get_data() File "D:\Anaconda3\envs\DINO\lib\site-packages\torch\utils\data\dataloader.py", line 1148, in _get_data success, data = self._try_get_data() File "D:\Anaconda3\envs\DINO\lib\site-packages\torch\utils\data\dataloader.py", line 986, in _try_get_data data = self._data_queue.get(timeout=timeout) File "D:\Anaconda3\envs\DINO\lib\multiprocessing\queues.py", line 116, in get return _ForkingPickler.loads(res) File "D:\Anaconda3\envs\DINO\lib\site-packages\torch\multiprocessing\reductions.py", line 298, in rebuild_storage_filename storage = cls._new_shared_filename(manager, handle, size) RuntimeError: Couldn't open shared event: <000002CE51E18662>, error code: <2>

进程已结束,退出代码1

Hezey commented 1 year ago

When I run main.py , the program has a bug What can i do and what is the problem?

Traceback (most recent call last): File "D:\JetBrains\Pycharm_Project\Traffic_Light_Detection\DINO\main.py", line 389, in main(args) File "D:\JetBrains\Pycharm_Project\Traffic_Light_Detection\DINO\main.py", line 273, in main train_stats = train_one_epoch( File "D:\JetBrains\Pycharm_Project\Traffic_Light_Detection\DINO\engine.py", line 41, in train_one_epoch for samples, targets in metric_logger.log_every(data_loader, print_freq, header, logger=logger): File "D:\JetBrains\Pycharm_Project\Traffic_Light_Detection\DINO\util\misc.py", line 238, in log_every for obj in iterable: File "D:\Anaconda3\envs\DINO\lib\site-packages\torch\utils\data\dataloader.py", line 517, in next data = self._next_data() File "D:\Anaconda3\envs\DINO\lib\site-packages\torch\utils\data\dataloader.py", line 1182, in _next_data idx, data = self._get_data() File "D:\Anaconda3\envs\DINO\lib\site-packages\torch\utils\data\dataloader.py", line 1148, in _get_data success, data = self._try_get_data() File "D:\Anaconda3\envs\DINO\lib\site-packages\torch\utils\data\dataloader.py", line 986, in _try_get_data data = self._data_queue.get(timeout=timeout) File "D:\Anaconda3\envs\DINO\lib\multiprocessing\queues.py", line 116, in get return _ForkingPickler.loads(res) File "D:\Anaconda3\envs\DINO\lib\site-packages\torch\multiprocessing\reductions.py", line 298, in rebuild_storage_filename storage = cls._new_shared_filename(manager, handle, size) RuntimeError: Couldn't open shared event: <000002CE51E18662>, error code: <2>

进程已结束,退出代码1

@HaoZhang534 @SlongLiu @FengLi-ust @rentainhe

SlongLiu commented 1 year ago

Well, provide some suggestions from new bing:

Hello, this is Bing. It seems that you are running into a RuntimeError when using PyTorch on Windows. This error may be caused by a problem with multiprocessing and shared memory12. One possible solution is to set num_workers=0 in your DataLoader function2. Another possible solution is to use Linux instead of Windows3. Have you tried any of these solutions?

Hezey commented 1 year ago

Well, provide some suggestions from new bing:

Hello, this is Bing. It seems that you are running into a RuntimeError when using PyTorch on Windows. This error may be caused by a problem with multiprocessing and shared memory12. One possible solution is to set num_workers=0 in your DataLoader function2. Another possible solution is to use Linux instead of Windows3. Have you tried any of these solutions?

Thanks for your reply! The early num_workers=10 and I just set it to 8 ,I don't know if this will run successfully to the end