M = pymc.MCMC(node_list, db='pickle', dbname='filename.pickle')
M.sample(1000, 500, 5)
M.db.close()
And I load the database:
db = pymc.database.pickle.load('filename.pickle')
When I try to reload this into an MCMC object with M = pymc.MCMC(node_list, db=db) I get a UserWarning: Failed to restore state of stochastic __ from pickle backend for each Node.
EDIT: I'm still not sure why, but I think this may be due to the node_list actually having different attributes from the nodes stored in the database. When I tried to reproduce this with a different model, it seemed to work fine instead. My bad.
Hey, say I define and sample a model
And I load the database:
db = pymc.database.pickle.load('filename.pickle')
When I try to reload this into an MCMC object with
M = pymc.MCMC(node_list, db=db)
I get aUserWarning: Failed to restore state of stochastic __ from pickle backend
for each Node.EDIT: I'm still not sure why, but I think this may be due to the node_list actually having different attributes from the nodes stored in the database. When I tried to reproduce this with a different model, it seemed to work fine instead. My bad.