-
Notifications
You must be signed in to change notification settings - Fork 154
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
fix errors in pymc sampler implementaton #1129
Conversation
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.
Great! It seems that this fixes all the problems? (see https://github.com/sbi-dev/sbi/actions/runs/8597285263/job/23555649100#step:7:3794)
@felixp8 can you please rebase on main
to include the recent fixes to the MCMC kwargs?
yup will try to do by eod |
After rebasing on With your fixes, the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1129 +/- ##
==========================================
- Coverage 85.45% 85.26% -0.19%
==========================================
Files 90 89 -1
Lines 6612 6616 +4
==========================================
- Hits 5650 5641 -9
- Misses 962 975 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
|
darn okay I'm somewhat sure model log-probs are correct now but it's possible also that the gradient is not correct. Don't think I'll have time to carefully go through the pymc internals for that until later this week |
OK, but given that No worries, maybe I will find time to have a look, or we just wait. 👍 |
actually, I ran the CD workflow with slow tests and they are passing now (we got lucky?). |
Tests are still passing, and I checked the posterior visually as well - all seems fine! Thanks for solving this @felixp8 ! 👏 |
What does this implement/fix? Explain your changes
Two errors in
PyMCSampler
fixed here:sbi.samplers.mcmc.pymc_wrapper
looked for matching step class instead of the string value actually used and expectedpymc.Model()
incorrectly set up using a prior distribution and additional likelihood term which does not result in the desired distribution. Now usingpymc.DensityDist
which directly defines the distribution using given potential functionWith these changes
test_c2st_pymc_sampler_on_Gaussian
passes locally for all sampling methods.Does this close any currently open issues?
Fixes #1127
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code.
guidelines
with
pytest.mark.slow
.guidelines
main
(or there are no conflicts withmain
)