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)
gives:
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.