-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept LogDensityProblems objects #122
Conversation
Codecov ReportBase: 92.69% // Head: 92.64% // Decreases project coverage by
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #122 +/- ##
==========================================
- Coverage 92.69% 92.64% -0.06%
==========================================
Files 13 13
Lines 575 571 -4
==========================================
- Hits 533 529 -4
Misses 42 42
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
For some reason, these changes break reproducibility when parallelizing with multithreading. Strange. |
Seems to be due to tpapp/LogDensityProblemsAD.jl#6, relates JuliaDiff/ForwardDiff.jl#573 |
On further thought, I think I will go the way of AdvancedHMC and DynamicHMC and completely remove the option where a user passes a function. This simplifies the code. Pathfinder should probably be used most as a backend, and regardless, it's easy to construct LogDensityProblems from models in the major PPLs. |
This PR removes the methods of
pathfinder
andmultipathfinder
that accepted both a function and its gradient and instead has a single method that takeseither a function oran object implementing the LogDensityProblems interface.It also moves away from using AbstractDifferentiation for ad backends (development seems to have stalled) in favor of using LogDensityProblemsAD. This should enable better compatibility with PPLs; Turing, Soss, and Tilde models all implement this interface.
Fixed #115