JohannesBuchner / UltraNest

Fit and compare complex models reliably and rapidly. Advanced nested sampling.
https://johannesbuchner.github.io/UltraNest/
Other
142 stars 30 forks source link

Saving full chain #131

Closed nstarman closed 3 months ago

nstarman commented 3 months ago

Description

Does ultranest have a means of saving all the points that it samples? When I run ultranest the "chains" folder is empty and the results.hdf5 contains many fewer points than are sampled in total. I don't see anything in the documentation for ReactiveNestedSampler explaining how to save the full history.

JohannesBuchner commented 3 months ago

No, this is not implemented. You can achieve this easily though with

mem = joblib.Memory('mycachefolder', verbose=True)
@mem.cache
def mylikelihood(...):
     ...

or similar

Then you can find the arguments and return values in that folder (with one subfolder per call).

JohannesBuchner commented 3 months ago

I am closing this for now.

nstarman commented 3 months ago

Thanks! The hack is useful for accomplishing this for now. I think saving the full history in a simple auxiliary_points.hdf5 (or some similar name) would still be very useful!