You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add extra accs argument for LogDensityFunction (#1196)
This PR fixes another feature regression in FastLDF, which is that the
accumulators used for actual evaluation of the log-density are
hardcoded. (Technically not hardcoded, but you have to overload some
internal function, which is not good.)
In SlowLDF the accs were taken from the VarInfo passed in:
https://github.com/TuringLang/DynamicPPL.jl/blob/6c615ad41946ffa11698408948f85cd4606262ff/src/logdensityfunction.jl#L135-L140
I found that I needed this functionality in the optimisation code so
that I can pass in the accumulator that checks at runtime whether
constraints are satisfied.
I **think** this isn't breaking, since it's the final positional
argument and it is optional.
Copy file name to clipboardExpand all lines: HISTORY.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,10 @@
1
1
# DynamicPPL Changelog
2
2
3
+
## 0.39.11
4
+
5
+
Allow passing `accs::Union{NTuple{N,AbstractAccumulator},AccumulatorTuple}` into the `LogDensityFunction` constructor to specify custom accumulators to use when evaluating the model.
6
+
Previously, this was hard-coded.
7
+
3
8
## 0.39.10
4
9
5
10
Rename the internal functions `matchingvalue` and `get_matching_type` to `convert_model_argument` and `promote_model_type_argument` respectively.
0 commit comments