TuringLang / AbstractMCMC.jl

Abstract types and interfaces for Markov chain Monte Carlo methods
https://turinglang.org/AbstractMCMC.jl
MIT License
78 stars 18 forks source link

Default `bundle_samples` is quite annoying #118

Open torfjelde opened 1 year ago

torfjelde commented 1 year ago

The default implementation of bundle_samples specializes on Vector{T}, which in becomes very annoying if you want to implement your own bundle_samples, e.g. if you then use AbstractVector you almost immediately run into ambiguity errors.

https://github.com/TuringLang/AbstractMCMC.jl/blob/7192263f967b4a6bb1f78957c734a6a41c383026/src/interface.jl#L38-L44

In addition, IIUC it seems quite "useless" given that by default sample already returns a Vector of the transitions?

Thoughts on removing this?

torfjelde commented 1 year ago

Do you have any thoughts on this @devmotion ?