TuringLang / AbstractMCMC.jl

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

Standardize logp, logweights, and "info" per-sample metadata #58

Open cscherrer opened 3 years ago

cscherrer commented 3 years ago

As I understand, there's currently no standard for passing values like the log-density or log-weight (when that exists) for each sample. Algorithms that require these will each have to come up with their own standards, which will then need to be managed separately.

I have some description of how I'm handling these one instance of SampleChains here.

It would make things much easier if things like this can be standardized, to the extent they're common across samplers.

cpfiffer commented 3 years ago

We had this but removed it. Our view is that this should be standardized within the various ecosystems that touch AbstractMCMC, for exactly the reason you've highlighted -- some samplers and model types need vastly different internals, and it's basically impossible (I think) to build a robust internal interface that standardizes everything.

cscherrer commented 3 years ago

"Everything" yes, sure. I'm suggesting standardizing optional per-sample named fields:

cpfiffer commented 3 years ago

Yeah, that's about what we had. We kind of decided that it not worth standardizing because cross-talk between samplers or whatever is already tricky enough. I think if this were to be standardized, it would be more at the AbstractPPL level and not at the AbstractMCMC level.