Latest PyMC3 from git fails to sample

When I’m using the latest version of PyMC3 from github (pip install git+ it fails to sample from this model (from the Bayesian Analysis with Python book):

with pm.Model() as pearson_model:

mu = pm.Normal('mu', mu=data.mean(0), sd=10, shape=2)
sigma_1 = pm.HalfNormal('sigma_1', 10)
sigma_2 = pm.HalfNormal('sigma_2', 10)
rho = pm.Uniform('ro', -1, 1)

cov = pm.math.stack(([sigma_1**2, sigma_1*sigma_2*rho], 
                     [sigma_1*sigma_2*rho, sigma_2**2]))

y_pred = pm.MvNormal('y_pred', mu=mu, cov=cov, observed=data)

start = pm.find_MAP()
step = pm.NUTS(scaling=start)
trace_pearson = pm.sample(2000, step=step, start=start)

I don’t get any errors, but it never seems to be able to draw a single sample. However when I’m using the released version of PyMC3 it works, so I’m thinking it’s a regression? Is it known? If not should I submit an issue in github?

And this is the code to generate the data:

N = 100
alpha_real = 2.5
beta_real = 0.9
eps_real = np.random.normal(0, .5, size=N)

x = np.random.normal(10, 1, N)
y_real = alpha_real + beta_real * x
y = y_real + eps_real
data = np.stack((x, y)).T

What system are you on? Try setting the njobs=1 to sample multiple chains sequentially.

I’m on Mac OS X 10.13.2 Beta on this machine. I will try with sequential chains when I get some time, hopefully later tonight.

Yeah, with njobs=1 it worked, why is that?

I think it is some kind of pickling issue, I have yet to pin down where is the problem… and seems it only happens in mac…