Skip to content

Commit 7bad057

Browse files
bchen93cschefflergithub-actions[bot]
authored
Set start method to fork for MacOs ARM devices (#6218)
* fixing paralell sampling issue on M1 Macs * Changing set method defaults for arm vs intel Mac Changing default multiprocessing start method to "fork" for ARM Macs and leaving default "forkserver" for intel macs. * Fix docstring of the ZeroInflatedPoisson distribution. The parameterization uses the variable `mu` but the docstring uses `mu` in some cases and `theta` in other cases. The fix replaces all `theta` with `mu` to match the argument name for this distribution. * Fix debug_print of wrong variable in notebook * Revert "Fix debug_print of wrong variable in notebook" This reverts commit 726d8d0. * Revert "Fix docstring of the ZeroInflatedPoisson distribution." This reverts commit 631d3d4. * Run pre-commit Co-authored-by: Carl Scheffler <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 2813811 commit 7bad057

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pymc/parallel_sampling.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,13 @@ def __init__(
406406

407407
if mp_ctx is None or isinstance(mp_ctx, str):
408408
# Closes issue https://github.com/pymc-devs/pymc/issues/3849
409+
# Related issue https://github.com/pymc-devs/pymc/issues/5339
409410
if platform.system() == "Darwin":
410-
mp_ctx = "forkserver"
411+
if platform.processor() == "arm":
412+
mp_ctx = "fork"
413+
else:
414+
mp_ctx = "forkserver"
415+
411416
mp_ctx = multiprocessing.get_context(mp_ctx)
412417

413418
step_method_pickled = None

0 commit comments

Comments
 (0)