NUTS doesn't run even with the simplest of models?

I am just getting started with PyMC3 and have tried to run a extremely simple example from Osvaldo Martin’s book, but NUTS seems to get hung up during initialization:

data = stats.bernoulli.rvs(p=0.35, size=4)
with pm.Model() as simple_model:
theta = pm.Beta(‘theta’, alpha=1., beta=1.)
y = pm.Bernoulli(‘y’, p=theta, observed=data)
trace = pm.sample(1000, random_seed=123)


Auto-assigning NUTS sampler…
Initializing NUTS using jitter+adapt_diag…
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [theta]

If I set chains=1 it initializes with 1 job and runs. However, if I set chains=2 and cores=2, it hangs again. What might be going wrong? I am using Python 3.8.3 and Anaconda 2020.11 on Windows 10.

Unfortunately parallelism on windows is still a bit unstable sometimes. The next version 3.10 which is coming out soon should have some fixes for that, however.

Thanks for the reply. I suppose that means there isn’t a short-term work around for running parallel jobs? In any case, looking forward to your next release then!

Some people have reported good success using WSL2

3.10 is out now. Can you try if that fixes your parallelism problem?