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

Force DHT to be mp.context.ForkProcess #589

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Force DHT to be mp.context.ForkProcess #589

merged 1 commit into from
Aug 31, 2023

Conversation

borzunov
Copy link
Member

@borzunov borzunov commented Aug 31, 2023

This doesn't change anything on Linux but helps macOS users. Specifically, it's helps to:

  • Avoid this error for people who don't use if __name__ == "__main__" in simple scripts on macOS (that uses spawn for processes by default).
  • Make DHT consistent with other code that inherits from mp.context.ForkProcess directly.

@codecov
Copy link

codecov bot commented Aug 31, 2023

Codecov Report

Merging #589 (02390ae) into master (d90a14d) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #589   +/-   ##
=======================================
  Coverage   85.30%   85.30%           
=======================================
  Files          81       81           
  Lines        8009     8009           
=======================================
  Hits         6832     6832           
  Misses       1177     1177           
Files Changed Coverage Δ
hivemind/dht/dht.py 90.41% <100.00%> (ø)

... and 3 files with indirect coverage changes

@borzunov borzunov merged commit 1eb5d18 into master Aug 31, 2023
15 checks passed
@borzunov borzunov deleted the dht-fork-process branch August 31, 2023 07:32
mryab pushed a commit that referenced this pull request Aug 31, 2023
This doesn't change anything on Linux but helps macOS users. Specifically, it's helps to:

- Avoid [this error](bigscience-workshop/petals#405 (comment)) for people who don't use `if __name__ == "__main__"` in simple scripts on macOS (that uses spawn for processes by default).
- Make DHT consistent with other code that inherits from `mp.context.ForkProcess` directly.

(cherry picked from commit 1eb5d18)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants