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

Set start method to forkserver for MacOS #3919

Merged
merged 3 commits into from
May 11, 2020

Conversation

AlexAndorra
Copy link
Contributor

@AlexAndorra AlexAndorra commented May 11, 2020

As discussed in #3912 with @lucianopaz and @twiecki, this PR sets the start method to forkserver when the platform is MacOS. This is intended to solve #3849.

As this is implemented in setup.py, the new start method is modified each time users import PyMC3, but it does it smoothly by using multiprocessing.get_context instead of multiprocessing.set_start_method. From the python docs:

A library which wants to use a particular start method should probably use get_context() to avoid interfering with the choice of the library user.

I did some raw tests locally and this does work!

  • No breaking changes (that I know of)
  • Added to RELEASE-NOTES.md

@codecov
Copy link

codecov bot commented May 11, 2020

Codecov Report

Merging #3919 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3919   +/-   ##
=======================================
  Coverage   83.59%   83.59%           
=======================================
  Files         103      103           
  Lines       14181    14181           
=======================================
  Hits        11854    11854           
  Misses       2327     2327           

@twiecki twiecki merged commit e200ba5 into pymc-devs:master May 11, 2020
@twiecki
Copy link
Member

twiecki commented May 11, 2020

Thanks @AlexAndorra!

@ivlis
Copy link

ivlis commented May 12, 2020

Thank you so much!

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.

3 participants