Open sebapersson opened 7 months ago
This is possible using the AbstractMCMC
interface with a different callback
keyword argument.
To do it propertly, one should just implement a callback
similar to
which only shows the progressbar without all the extra information.
Buuut because in the AbstractMCMC-interface impl we only use the HMCProgressCallback
if no callback
is manually specified, e.g.
we can just provide a callback
that does nothing and set progress=true
, which then hits the default progress meter in AbstractMCMC.sample
, which is exactly what you want.
In short, try the following:
# HACK: a callback that does nothing to avoid hitting `HMCProgressCallback`
callback(rng, model, sampler, transition, state, i) = nothing
samples = AbstractMCMC.sample(
model,
sampler,
n_adapts + n_samples;
nadapts = n_adapts,
initial_params = initial_θ,
callback=callback,
progress=true, # will use default progress meter i `AbstractMCMC`
)
Thanks for this package. I tried the example in the README with
progress=true
(on Julia 1.10 and AdvancedHMC v0.6.1):This has a progress-bar, and in the addition the following information is printed:
Is this a feature, and is there anyway to only print the progressbar?