It seems that the traceplot() function gets stuck when plotting data when a Deterministic node is present on the model. Example of a simple model below:
with pm.Model() as linear_model:
alpha = pm.Normal('alpha', mu=0, sd=2)
beta = pm.Normal('beta', mu=0, sd=2, shape=shape_size)
sigma = pm.HalfNormal('sigma', sd=2)
mu = pm.Deterministic("mu", alpha + beta[codes])
y_obs = pm.Normal('y_obs', mu=mu, sd=sigma,
observed=data)
When I call traceplot(), it only works if I manually specify all other nodes except the deterministic one. Otherwise, it gets stuck on a loop of matplotlib eating CPU resources.
I’m using PyMC3 3.5.