Skip to content

v0.34.2

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 27 Jan 16:26
· 7 commits to master since this release
29a6c7e

DynamicPPL v0.34.2

Diff since v0.34.1

  • Fixed bugs in ValuesAsInModelContext as well as DebugContext where underlying PrefixContexts were not being applied. From a user-facing perspective, this means that for models which use manually prefixed submodels, e.g.
using DynamicPPL, Distributions

@model inner() = x ~ Normal()

@model function outer()
  x1 ~ to_submodel(prefix(inner(), :a), false)
  x2 ~ to_submodel(prefix(inner(), :b), false)
end

will: (1) no longer error when sampling due to check_model_and_trace; and (2) contain both submodel's variables in the resulting chain (the behaviour before this patch was that the second x would override the first x).

  • More broadly, implemented a general prefix(ctx::AbstractContext, ::VarName) which traverses the context tree in ctx to apply all necessary prefixes. This was a necessary step in fixing the above issues, but it also means that prefix is now capable of handling context trees with e.g. multiple prefixes at different levels of nesting.

Merged pull requests: