Closed pipme closed 1 year ago
Thanks for this @pipme! Everything looks correct to me, I just added I couple things:
logger.basicConfig()
back to the top of vbmc.__init__()
. I know it makes more sense in vbmc._init_logger()
, but if any warnings are issued before that (e.g. when validating options) then Python calls basicConfig()
anyway but we loose our custom formatting.If that makes sense to you then I think it's good to merge.
I added a test to make sure that stopping and resuming optimization gives similar results to running all the way through.
- For some reason I couldn't get identical results, even with the same seed. Not sure why, though I've noticed this before in casual testing. But I think this test is good enough for its purpose.
There are two reasons:
VBMC.__init__()
since the initialization of variational posterior also affects numpy random stateI make another pull request #111 for fixing.
vbmc.optimize()
after loading from the checkpointvbmc.pkl
.vp.gp
. Nowself.gp
correponds toself.vp
at current iterationself.iteration
.