Merged
Conversation
Contributor
|
AdvancedHMC.jl documentation for PR #471 is available at: |
Member
Author
|
Ack, have to fix CI for 1.12. |
Member
Author
|
I ran the tests locally and it's only JET that's failing, so I'll open a separate issue for that. |
penelopeysm
added a commit
to TuringLang/Turing.jl
that referenced
this pull request
Nov 5, 2025
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
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.
No description provided.