-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
BrokenProcessPool in fastai.vision.utils.download_images() on Windows #3196
Comments
This appears to be fixed in #3194. This should be fixed on windows, but if by any chance it is not, please let us know and we will reopen this issue. I have tested this in Colab: see notebook I have also tested that this works locally on my mac. |
Reopening since I believe this is unrelated to #3194 |
Sorry about this! I was confused. |
Ok! This should be resolved with #3197 please let us know if this fixes things for you! |
I actually got this problem and for the rest of the dumb coders like me if a standard
|
Please confirm you have the latest versions of fastai, fastcore, and nbdev prior to reporting a bug (delete one): YES
Describe the bug
When calling `fastai.vision.utils.download_images()` with a URL list and destination Path, some students of mine* who were running on Windows received a BrokenProcessPool exception (click to expand):
To Reproduce
Steps to reproduce the behavior:
download_images
:Expected behavior
The code should download all images, irrespective of the platform it is run on.
Error with full stack trace
At least for some versions of Windows, it fails with the stack trace given on top. As I lack access to Windows machines, I unfortunately don't know exactly what circumstances must be met, but at least 2 in 250 people were affected.
Additional context
Judging from https://stackoverflow.com/questions/43836876/processpoolexecutor-works-on-ubuntu-but-fails-with-brokenprocesspool-when-r and https://bugs.python.org/issue17874, this is a general problem with the
ProcessPoolExecutor
running from an interactive shell. Using aThreadPoolExecutor
would be an easy fix. As suggested in #978, this would require addingthreadpool=True
to the call in https://github.com/fastai/fastai/blob/0e01131/fastai/vision/utils.py#L37. (Sorry, I haven't looked into how to submit a PR to fastai, given that all the code seems to be generated from notebooks, so I'm just reporting the problem and a potential fix here.)Pinging @jph00 since he wanted to be informed.
(* Just if you're wondering, I've used the image downloader and cnn_learner in a university class to demonstrate what's possible with transfer learning and what isn't, and am of course giving proper credit to the fastai library and the corresponding fastbook chapter! Thank you for the great work!)
The text was updated successfully, but these errors were encountered: