-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add nuts_sampler_kwargs to pm.sample #6581
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
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6581 +/- ##
==========================================
- Coverage 92.01% 92.00% -0.01%
==========================================
Files 92 92
Lines 15535 15539 +4
==========================================
+ Hits 14294 14297 +3
- Misses 1241 1242 +1
|
Greatly simplified now. |
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.
See minor comment, otherwise this looks great.
Apply suggested nuts_sampler_kwarg docstring change Co-authored-by: Thomas Wiecki <[email protected]>
import pytest | ||
|
||
from pymc import Model, Normal, sample | ||
|
||
# turns all warnings into errors for this module | ||
pytestmark = pytest.mark.filterwarnings("error") |
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.
If a test raises a warning it should be caught explicitly with pytest.warns
.
pre-commit failed |
Here is the link: https://github.com/pymc-devs/pymc/pull/6581/checks |
Oh dang, it was my last-minute edit. |
What is this PR about?
In the current release, optional parameters for
sample_numpyro_nuts
were not making it through when passed frompm.sample
:This PR reinstates the
nuts_kwargs
argument as a means for getting NUTS arguments to the sampler, and adds asampler_kwargs
argument for passing sampler-specific arguments, such as "chain_method" or "postprocessing_backend".Checklist
Major / Breaking Changes
New features
nuts_sampler_kwargs
optional argument topm.sample()
to forward kwargs to an external nuts implementation.Bugfixes
Documentation
Maintenance