Skip to content

Conversation

@penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Nov 3, 2025

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).

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

Pull Request Test Coverage Report for Build 19030490180

Details

  • 4 of 6 (66.67%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to 89.865%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/RobustAdaptiveMetropolis.jl 0 2 0.0%
Totals Coverage Status
Change from base Build 19030414374: -0.5%
Covered Lines: 266
Relevant Lines: 296

💛 - Coveralls

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.03%. Comparing base (6ac07d5) to head (c6c6a48).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/RobustAdaptiveMetropolis.jl 0.00% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

AdvancedMH.jl documentation for PR #119 is available at:
https://TuringLang.github.io/AdvancedMH.jl/previews/PR119/

@penelopeysm penelopeysm merged commit e318654 into main Nov 3, 2025
7 of 8 checks passed
@penelopeysm penelopeysm deleted the py/getstats branch November 3, 2025 10:09
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants