Skip to content
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

Add call to freeze_support in training script #156

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lostella
Copy link
Contributor

@lostella lostella commented Jul 23, 2024

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 lostella requested a review from abdulfatir July 23, 2024 07:43
@lostella lostella linked an issue Jul 23, 2024 that may be closed by this pull request
2 tasks
@abdulfatir
Copy link
Contributor

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

@lostella
Copy link
Contributor Author

lostella commented Jul 23, 2024

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 lostella added bugfix Contains a bug fix windows Concerns running code on Windows labels Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Contains a bug fix windows Concerns running code on Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] EOF error in pickle when reading arrow file
2 participants