Add call to freeze_support in training script
Issue #, if available: May resolve #155
Description of changes: See here, and answer here.
TODO:
- [ ] validate script running fine on windows
- [ ] validate script running fine on linux
- [ ] validate script running fine on macos
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
What does this mean?
The
freeze_support()line can be omitted if the program will be run normally instead of frozen.
https://docs.python.org/2/library/multiprocessing.html#windows
What does this mean?
The
freeze_support()line can be omitted if the program will be run normally instead of frozen.https://docs.python.org/2/library/multiprocessing.html#windows
From what I understand, "frozen" refers to a Python program having been packaged in a standalone executable, with Python interpreter and all the environment needed (I guess?), and that might be how things need to run in order for spawn-ed processes to work correctly. (On linux, fork is used by default so I guess there's no need to start a new Python interpreter from scratch.)
This said, multiprocessing isn't my thing, so this may not be 100% correct.
@lostella should we close this?