TuringLang / AdvancedHMC.jl

Robust, modular and efficient implementation of advanced Hamiltonian Monte Carlo algorithms
https://turinglang.org/AdvancedHMC.jl/
MIT License
228 stars 39 forks source link

Fix Step #359

Open JaimeRZP opened 9 months ago

JaimeRZP commented 9 months ago

Fix #350

devmotion commented 9 months ago

This will fix the error I ran into, but the more general problem still exists: Since AdvancedHMC adds special keyword arguments to sample, sample and the step and steps iterators/transducers become inconsistent and generic calls of sample in other packages will perform sampling differently from AdvancedHMC because in general n_adapts etc. are not supported by sample and hence can't be provided in such generic situations.

That is, I think to fix these inconsistencies customizations of the sample call should mainly be done via the sampler (e.g., by adding fields that change the behaviour of step).

yebai commented 9 months ago

I suggest merging this PR for a hotfix; we can remove n_adapts when https://github.com/TuringLang/AbstractMCMC.jl/pull/117 is complete.