TuringLang / AdvancedHMC.jl

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

Compatibility with MCMCChains #309

Closed kaandocal closed 1 year ago

kaandocal commented 1 year ago

This is a very minor pull request for conveniently bundling samples from AdvancedHMC.jl into an Chains object from MCMCChains.jl. Very similar to the interface in AdvancedMH.jl, it should make it easier to switch from one to the other.

devmotion commented 1 year ago

I think ultimately we should try to improve the packages and interfaces such that downstream packages get this for free/automatically or by implementing a more minimal interface (at least don't have to depend on MCMCChains/Requires). Weak dependencies could help with this in Julia >= 1.9 but somehow it feels unsatisfying if similar code is added to every sampler package.

sethaxen commented 1 year ago

Documenting this with a usage example would also be great.

yebai commented 1 year ago

thanks @kaandocal and @sethaxen!