chronos-forecasting icon indicating copy to clipboard operation
chronos-forecasting copied to clipboard

Add call to freeze_support in training script

Open lostella opened this issue 1 year ago • 2 comments

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.

lostella avatar Jul 23 '24 07:07 lostella

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

abdulfatir avatar Jul 23 '24 08:07 abdulfatir

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 avatar Jul 23 '24 08:07 lostella

@lostella should we close this?

abdulfatir avatar Nov 06 '24 09:11 abdulfatir