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

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

Closed HoisW closed 9 months ago

HoisW commented 9 months 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 9 months ago

add resume=True to the line instantiating the ReactiveNestedSampler.