JohannesBuchner / UltraNest

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

How to Resume Execution with Only the results/points.hdf5 File? #113

Closed HoisW closed 1 year ago

HoisW commented 1 year ago

I ran the following code:

import ultranest
sampler = ultranest.ReactiveNestedSampler(parameters, log_likelihood, prior_transform, log_dir='my_gauss')
result = sampler.run()

During the execution, my computer shut down unexpectedly. Now, I only have the points.hdf5 file in the folder. I can read it using ultranest.read_file(log_dir='my_gauss/run/', x_dim=2). However, I want to continue with sampler.run(). How should I modify the code?

JohannesBuchner commented 1 year ago

add resume=True to the line instantiating the ReactiveNestedSampler.