Use structural AbstractPPL AD prep for LogDensityFunction#1365
Merged
Conversation
Contributor
Benchmark Report
Computer InformationBenchmark Results |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## adproblems-interface #1365 +/- ##
========================================================
+ Coverage 78.68% 82.20% +3.52%
========================================================
Files 49 49
Lines 3490 3490
========================================================
+ Hits 2746 2869 +123
+ Misses 744 621 -123 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bb839a0 to
1bffd79
Compare
Contributor
|
DynamicPPL.jl documentation for PR #1365 is available at: |
f2edd3d to
663550f
Compare
- logdensityfunction.jl: `fix_transform` → `fix_transforms` in docstring signature; tighten two internal comments - MarginalLogDensitiesExt: `oavi` → `accs` in example code; fix article typo "the an" → "an" - MCMCChainsExt: remove redundant comment after `|| continue` guard - vector_values.jl: collapse two-line comment to one (drop WHAT line) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
Author
|
@penelopeysm, this should be ready for a look. |
penelopeysm
reviewed
Apr 21, 2026
Member
|
I think the multivariate 10k benchmark should probably be looked at locally too, maybe tomorrow. |
Member
Author
|
@penelopeysm, all the issues should have been fixed.
Can you run this locally? |
c60e89a to
378f974
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1364
TODO
mainas base, as otherwise benchmarking would fail, need to change back to Is_use_closurestill necessary with native gradient API #1364 before merging.Julia 1.10’s Pkg does not reliably apply the root [sources] override during build/test, so min CI fails.This change switches
LogDensityFunctionAD preparation to pass a structuralLogDensityAtproblem directly intoAbstractPPL.prepare(...)instead of wrapping it in backend-specific anonymous closures. It also removes the old_use_closuremachinery, since the structural problem object now provides the stable one-argument evaluator shape that AD backends need.The accompanying test coverage adds a focused
ReverseDiffcheck to confirm thatAutoReverseDiff(; compile=true)still retains a compiled tape and can be reused across repeatedlogdensity_and_gradientcalls.Benchmarks