Closed torfjelde closed 9 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/context_implementations.jl | 8 | 9 | 88.89% | ||
<!-- | Total: | 8 | 9 | 88.89% | --> |
Totals | |
---|---|
Change from base Build 6952497716: | 0.02% |
Covered Lines: | 2572 |
Relevant Lines: | 3153 |
Attention: 1 lines
in your changes are missing coverage. Please review.
Comparison is base (
b52e4c2
) 81.00% compared to head (3561ab2
) 81.03%.
Files | Patch % | Lines |
---|---|---|
src/context_implementations.jl | 88.88% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR adds two new methods:
acclogp_assume!!
acclogp_observe!!
The idea is to provide slightly more control over the
acclogp!!
process, beyond (#563).The main motivation for this, is to fix the bug where particle samplers in Turing.jl currently do not respect the contextual tilde-pipeline since we accumulate the
logp
in the "leaf" of the tilde-pipeline, e.g.observe
andassume
:This means that any context which alters the value of
logp
, e.g.MiniBatchContext
, will have no effect.After this PR, particle samplers can overload
acclogp_observe!!
to runLibtask.produce(logpdf(dist, value))
, which occurs at the very end of the tilde-pipeline, hence allowing these samplers to also respect the context behaviors.