-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Access to external nuts samplers via sample
#6422
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 #6422 +/- ##
==========================================
- Coverage 94.74% 94.74% -0.01%
==========================================
Files 146 147 +1
Lines 27807 27861 +54
==========================================
+ Hits 26346 26397 +51
- Misses 1461 1464 +3
|
So far nutpie doesn’t provide precompiled Python wheels. So users that pip install pymc are unable to use this sampler. pymc-devs/nutpie#22 |
That's okay, we're not making it the default here. There's a try except import with an informative message |
nutpie can currently only be installed via maturin, correct? |
It's also available via conda-forge. |
Is this important? Not very familiar with types. |
sample
sample
sample
f2dfcaa
to
5b5b9c9
Compare
Hmm a specific version of pymc is being installed by nutpie... so the test doesn't make much sense... |
@ricardoV94 Any progress? What's the status? Should someone else take over? |
The problem is I don't know how to test nutpie, because nutpie has a direct dependency in pymc/pytensor (at least the conda package). I'll see if it can be pip installed instead. But it may not make sense to test at all given the circular dependency |
OK, lets just not test it then, or only if it's istalled. |
f88fadb
to
27bc414
Compare
Tests pass! Last comment but LGTM otherwise. |
Tests already passed before, they were failing for unrelated reasons :) Still didn't remove the test dependency on nutpie |
27bc414
to
c18522f
Compare
@@ -503,7 +613,7 @@ def sample( | |||
) | |||
|
|||
sample_args = { | |||
"draws": draws, | |||
"draws": draws + tune, # FIXME: Why is tune added to draws? |
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.
probably a relic of old signatures
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 will open an issue after this PR to investigate it
Have you tried using dependency injection? Because if yes, other way would be to use unittest.mock, I've used it in the past but that will depend on how complex the test is. |
Maybe the dependency is not too bad. It first installs nutpie and then the local pymc, so I guess if PyMC depends on a newer PyTensor it will replace it by that? We can merge and see what happens when we next bump the PyTensor dependency. |
c18522f
to
8df3fec
Compare
Reorder arguments more logically [citation needed]
8df3fec
to
f489848
Compare
This looks great! merge? |
Never hurts to see what happens next :D |
Let's do a minor release! |
TODO:
Major
draws
insample
are now keyword-only.Enhancements
sample