Every time I use more than one core on my pymc3, I get the following error -
RuntimeError: Chain 0 failed.
Here’s my code -
import pymc3 as pm
import numpy as np
import matplotlib.pyplot as plt
obs_y = np.random.normal(0.5, 0.35, 2000)
with pm.Model() as exercise1:
mu = pm.Normal('mu', mu = 0.0, sd = .05)
stdev = pm.HalfNormal('stdev', sd=.05)
y = pm.Normal('y', mu = mu, sd = stdev, observed = obs_y)
trace = pm.sample(1000, cores=2)
pm.traceplot(trace)
plt.show()
This problem doesn’t occur when I use the following code -
trace = pm.sample(1000, cores=1)
Here are my library versions. My objective was to run my sampling using GPU, therefore I installed pygpu, which might have caused the issue.
Theano-PyMC 1.1.2
pygpu 0.7.6
pymc3 3.11.5