Skip to content

Commit e42a401

Browse files
author
AninnovativeCoder
committed
Fix pymc-devs#7519: Move multiprocessing import to local scope in run_chains
1 parent 46b306a commit e42a401

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymc/smc/sampling.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414

1515
import logging
16-
import multiprocessing
1716
import time
1817

1918
from collections import defaultdict
@@ -354,6 +353,7 @@ def run_chains(chains, progressbar, params, random_seed, kernel_kwargs, cores):
354353
disable=not progressbar,
355354
) as progress:
356355
futures = [] # keep track of the jobs
356+
import multiprocessing
357357
with multiprocessing.Manager() as manager:
358358
# this is the key - we share some state between our
359359
# main process and our worker functions

0 commit comments

Comments
 (0)