Skip to content

Commit 636b957

Browse files
digicosmos86michaelosthege
authored andcommitted
fixed overriding user provided strings and added debug message
1 parent 5688555 commit 636b957

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pymc/sampling/parallel.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,13 @@ def __init__(
386386
if mp_ctx is None or isinstance(mp_ctx, str):
387387
# Closes issue https://github.com/pymc-devs/pymc/issues/3849
388388
# Related issue https://github.com/pymc-devs/pymc/issues/5339
389-
if platform.system() == "Darwin":
389+
if mp_ctx is None and platform.system() == "Darwin":
390390
if platform.processor() == "arm":
391391
mp_ctx = "fork"
392+
logger.debug(
393+
"mp_ctx is set to 'fork' for MacOS with ARM architecture. "
394+
+ "This might cause unexpected behavior with JAX, which is inherently multithreaded."
395+
)
392396
else:
393397
mp_ctx = "forkserver"
394398

0 commit comments

Comments
 (0)