johannesulf / nautilus

Neural Network-Boosted Importance Nested Sampling for Bayesian Statistics
https://nautilus-sampler.readthedocs.io
MIT License
73 stars 8 forks source link

save intermediate results of the likelihood function in parallelization #40

Closed Jane550 closed 12 months ago

Jane550 commented 1 year ago

Hi Johannes! I want to plot the posterior model predictions. When calculating the likelihood, we need to calculate the model predictions first. So I was wondering if there is a way to save the model prediction results each time calling the likelihood function. I want to collect the model prediction results into one file. I am using MPI.pool() now to parallelize the neural network and sampling part as indicated in the tutorial. Is there a way to save the intermediate model prediction results into one file when calling 'sampler' and 'sampler.run()'? Otherwise, I'll have to repeat calculating the model predictions which is quite time-consuming.

johannesulf commented 1 year ago

Hi Jane, I think what you're describing can be solved with blobs. Have a look at the documentation page and let me know if anything is unclear. You should be able to save such intermediate results using this feature.

Jane550 commented 12 months ago

Problem solved. Many thanks!!!