CUQI-DTU / CUQIpy

https://cuqi-dtu.github.io/CUQIpy/
Apache License 2.0
44 stars 9 forks source link

Functionality to not append all samples to sampler history #531

Open siljachr opened 1 month ago

siljachr commented 1 month ago

When sampling large scale problems, it requires a lot of memory to append and store all samples to history. CUQIpy offers the functionality to save samples in "batches" of specified sizes. This let's the user save smaller files, but does not change to total storage requirements, as I understand it.

I am interested in functionality where I can pre-specify a thinning parameter, e.g. 10, such that the sampler updates the state 10 times before appending to the history. A variaty of this seems to be implemented for experimental.mcmc.HybridGibbs (num_sampling_steps), but for the regular experimental.mcmc.sampler, this does not seem to be an option.