-
Notifications
You must be signed in to change notification settings - Fork 23
implement AbstractMCMC.getstats
#119
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
Conversation
Pull Request Test Coverage Report for Build 19030490180Details
💛 - Coveralls |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #119 +/- ##
==========================================
+ Coverage 89.86% 90.03% +0.17%
==========================================
Files 9 9
Lines 286 311 +25
==========================================
+ Hits 257 280 +23
- Misses 29 31 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
AdvancedMH.jl documentation for PR #119 is available at: |
Following on from: - TuringLang/AbstractMCMC.jl#182 Adding the interface function `AbstractMCMC.getstats` - TuringLang/AdvancedHMC.jl#471 and TuringLang/AdvancedMH.jl#119 Implementing them for AdvancedHMC and AdvancedMH this PR changes Turing's external sampler interface to exclusively use AbstractMCMC functions. **With this PR, anyone who defines an external sampler will only need to depend on AbstractMCMC (which they presumably already do, because it is a sampler) and LogDensityProblems (which is already a dep of AbstractMCMC).** No need for a Turing extension. To be precise, it makes the following changes: - Previously where one had to define `Turing.Inference.getparams`, now one has to define `AbstractMCMC.getparams`. - Previously there was no way to include sampler stats in the resulting chain, now one can define `AbstractMCMC.getstats`. - The default for `Turing.Inference.isgibbscomponent` is changed to `true`, so that external sampler packages don't need to override it (unless absolutely necessary). As an example implementation, this PR contains a test mock (note how it doesn't require a Turing dep): https://github.com/TuringLang/Turing.jl/blob/06752c41a97cd0dc37bb8700ab7a2d06f50f4f76/test/mcmc/external_sampler.jl#L20-L74
implements interface for https://github.com/TuringLang/AbstractMCMC.jl/releases/tag/v5.9.0.
Also some improvements to CI (disabled testing on 'pre', added 'lts' for good measure).