Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pymc/sampling/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,13 @@ def __init__(
if mp_ctx is None or isinstance(mp_ctx, str):
# Closes issue https://github.com/pymc-devs/pymc/issues/3849
# Related issue https://github.com/pymc-devs/pymc/issues/5339
if platform.system() == "Darwin":
if mp_ctx is None and platform.system() == "Darwin":
if platform.processor() == "arm":
mp_ctx = "fork"
logger.debug(
"mp_ctx is set to 'fork' for MacOS with ARM architecture. "
+ "This might cause unexpected behavior with JAX, which is inherently multithreaded."
)
else:
mp_ctx = "forkserver"

Expand Down