-
Couldn't load subscription status.
- Fork 230
Fix externalsampler interface #2640
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
|
Turing.jl documentation for PR #2640 is available at: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2640 +/- ##
=======================================
Coverage 84.88% 84.88%
=======================================
Files 22 22
Lines 1475 1475
=======================================
Hits 1252 1252
Misses 223 223 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (https://github.com/TuringLang/Turing.jl/actions/runs/16673713759/job/47195523882?pr=2640 is a bit worrying because on min)
|
Yeahh, just noticed that too. It's been happening a few times and we're not sure what triggered it although rerunning CI tends to make it pass, so it's not fully deterministic. |
|
It might be this? JuliaLang/julia#54840 |
|
I think that's the offending bug. The stack trace shows In fact it wasn't backported to 1.11 either but I suppose it's possible that other changes were made to 1.11 that made the race conditions less likely to happen. FYI @mhauru @AoifeHughes |
Pull Request Test Coverage Report for Build 16673713759Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
v0.39.5 #2616 inadvertently changed the required interface for external samplers to include
rather than
which is what came before it. Note that
Turing.Inference.getparamsserves a different purpose compared toAbstractMCMC.getparamsand the external sampler interface should really useAbstractMCMC.getparams.Furthermore,
Turing.Inference.getparamsis an internal function so in principle changing it should not require a breaking release --- but unfortunately I didn't catch that this internal function was part of the external sampler interface. So it was a mistake to make this change in a patch release. (Sorry.) This PR therefore reverts the change.On top of that, the existing externalsampler tests did not catch this because they only tested on AdvancedMH and AdvancedHMC, for which both methods are overloaded.
So this PR also adds a test with a external sampler that satisfies the minimal interface as specified in the
ExternalSamplerdocstring. This ensures that if we change the interface this test will break. See e.g. 'The Test Fake' in https://invenia.github.io/blog/2020/11/06/interfacetesting/.