How to save and load trace

Hi all,

I tried to load my trace as well, but it came with ‘NoneType’ error.
I followed what suggested here but no avail.

the last several lines of my code looks as follows:

with pm.Model() as model:
(some indentation) …
(some indentation) y_ = gp.marginal_likelihood(‘y’, X=Xs, Xu=Xu, y=Ys, noise=sigma)
(some indentation) # approx = pm.ADVI().fit(n=5000)
(some indentation) # trace = approx.sample(1000)
trace = pm.load_trace(’.pymc_1.trace’, model=model)

Did I miss something to load?

Thanks

1 Like