TuringLang / JuliaBUGS.jl

A domain specific language (DSL) for probabilistic graphical models
https://turinglang.org/JuliaBUGS.jl/
MIT License
21 stars 3 forks source link

Remove dependency on DynamicPPL. #206

Closed yebai closed 3 weeks ago

yebai commented 3 months ago

All DynamicPPL functionality used by JuliaBUGS should probably be transferred to AbstractPPL.

sunxd3 commented 2 months ago

(this reply is a draft, will edit as I go)

JuliaBUGS now uses DynamicPPL for:

  1. SimpleVarInfo and the get/set functions (these are mostly BangBang)
  2. the unflatennning functions that take a vector of values and restore them into the right size for logp evaluation

item 1, IMO can be totally removed because JuliaBUGS use a simple NamedTuple to store all the values, and varnames in JuliaBUGS are simple and straightforward. still a lot of merits in using SimpleVarInfo, so good idea to transfer the code to AbstractPPL.

item 2, this is common code that can be shared by JuliaBUGS and DynamicPPL. these code can live in AbstractPPL.jl or Bijectors.jl

yebai commented 2 months ago

cc @mhauru and @penelopeysm

yebai commented 2 months ago

My view is that both SimpleVarInfo (also known as tracing types or effects elsewhere in the PPL literature) and VarNamedVector can eventually be transferred to AbstractPPL.