-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Allow var_names
to be propagated to nutpie sampler
#7850
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
|
pm.sample(...,var_names=var_names, nuts_sampler=nutpie)
pm.sample(...,var_names=var_names, nuts_sampler=nutpie)
pm.sample(...,var_names=var_names, nuts_sampler="nutpie")
tests/sampling/test_mcmc_external.py
Outdated
@@ -16,20 +16,20 @@ | |||
import numpy.testing as npt | |||
import pytest | |||
|
|||
from pymc import Data, Model, Normal, sample | |||
import pymc as pm |
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.
Why this change? We prefer to test with explicit imports
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.
I am used to this standard, but happy to change it back
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.
I don't see where it say you shouldn't import objects? Anyway changing unrelated code / previous approach leads to noise in the git changes. If you would want to propose a new standard it would also be applied to the whole codebase, not the single file you happened to look at.
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.
Looks good, just some nits on the tests
Co-authored-by: Ricardo Vieira <ricardo.vieira1994@gmail.com>
Co-authored-by: Ricardo Vieira <ricardo.vieira1994@gmail.com>
Co-authored-by: Ricardo Vieira <ricardo.vieira1994@gmail.com>
Co-authored-by: Ricardo Vieira <28983449+ricardoV94@users.noreply.github.com>
pm.sample(...,var_names=var_names, nuts_sampler="nutpie")
var_names
to be propagated to nutpie sampler
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7850 +/- ##
==========================================
+ Coverage 91.84% 92.92% +1.08%
==========================================
Files 107 107
Lines 18301 18299 -2
==========================================
+ Hits 16808 17004 +196
+ Misses 1493 1295 -198
🚀 New features to boost your workflow:
|
Thanks @PabloRoque ! |
First PR! 🥳 Thank you! @ricardoV94 |
Description
Passing
var_names
tonutpie
sampler has been supported since 0.13.3.This PR just activates this option when using nutpie sampler from
pymc
Related Issue
Checklist
Type of change
📚 Documentation preview 📚: https://pymc--7850.org.readthedocs.build/en/7850/