DynamicPPL.jl icon indicating copy to clipboard operation
DynamicPPL.jl copied to clipboard

Add default implementations of `assume` and `dot_assume`

Open penelopeysm opened this issue 1 year ago • 1 comments

cf. https://github.com/TuringLang/Turing.jl/pull/2360#discussion_r1787652942

dot_assume's fallback method is here: https://github.com/TuringLang/DynamicPPL.jl/blob/7f91c07e51fccbbc3b503eb9f9ba3dba69fe90f0/src/context_implementations.jl#L489-L493

As far as I can tell assume doesn't have a fallback method so that would just need to be added.

penelopeysm avatar Oct 07 '24 10:10 penelopeysm

IMO we should do this for all the methods.

Most samplers which are currently overloading the tilde-pipeline does so only to call updategid! and then nothing else (compared to SampleFromPrior).

These implementations subsequently go out of date (sometimes silently), making it all very annoying to maintain.

The only "objection" to this change is that we should (hopefully soon) remove the need for upategids!, in which case this default overload is not that useful.

torfjelde avatar Oct 07 '24 11:10 torfjelde

Probably no longer needed since SampleFromPrior etc. are being removed.

penelopeysm avatar Jul 19 '25 20:07 penelopeysm