New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataLoader errors when I set num_workers>1 #20
Comments
Maybe tqdm is used in the code? |
Could you provide more details to reproduce this bug? I set the num_workers here as 2, and it can run normally. |
I used examples of train_office and edit a little. I have changed train_dataloaders to my dataloader but it is still imported by torch.utils.data.DataLoader |
Could you successfully run train_office.py if you set the num_workers here as 2? |
I haven't tried yet, but I will try after downloading the dataset. Will there any difference in using dataloaders of train_office.py? |
Anyway, you need to provide enough details (such as environment, source code, running command, and so on) to help us to reproduce this bug. Otherwise, it is hard to find the problem just according to the error information. Thus, the most effective and efficient way is to test the examples we provided. If it is ok, maybe you have edited some code wrongly such as defining the new Dataloader with the wrong format. |
OK, thank you, I will tell you the result after testing the examples. |
Closed as no further updates. |
I have found someone says set num_workers=0 will work,but it's too slow...My system is Ubuntu
Exception ignored in: <function _MultiProcessingDataLoaderIter.del at 0x7f7c408fce60>
Traceback (most recent call last):
File "/home/user/miniconda3/envs/IB/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1510, in del
self._shutdown_workers()
File "/home/user/miniconda3/envs/IB/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1493, in _shutdown_workers
if w.is_alive():
File "/home/user/miniconda3/envs/IB/lib/python3.7/multiprocessing/process.py", line 151, in is_alive
assert self._parent_pid == os.getpid(), 'can only test a child process'
AssertionError: can only test a child process
The text was updated successfully, but these errors were encountered: