-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Run whole suite with CVM and Numba linkers #7993
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
11964ce to
ab53d82
Compare
2e3466e to
82ee1d9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7993 +/- ##
=======================================
Coverage 91.44% 91.45%
=======================================
Files 116 116
Lines 19002 19025 +23
=======================================
+ Hits 17377 17399 +22
- Misses 1625 1626 +1
🚀 New features to boost your workflow:
|
a3f98e2 to
a471e75
Compare
a471e75 to
93a552f
Compare
93a552f to
a0b679a
Compare
b36a9d9 to
9c28ebd
Compare
|
Seems like only one meaningful test failure left: https://github.com/pymc-devs/pymc/actions/runs/20662736046/job/59344923930?pr=7993#step:5:1066 |
Less noisy when doing interactive debugging
Remove useless os paramerizations and update codecov name
4d98fe3 to
c88bc7a
Compare
Most warnings are filtered by PyTensor but pytest reenables them
c88bc7a to
cd3983e
Compare
|
Tests are passing, CI didn't blow up, although it's a tad slower. This is the slowest one: https://github.com/pymc-devs/pymc/actions/runs/20717356014/job/59471703297?pr=7993#step:5:994 We may want to tweak the first two which take 2m (8% of the whole CI time) And these, as the CI had a large delta from the one in CVM: https://github.com/pymc-devs/pymc/actions/runs/20717356014/job/59471703228?pr=7993#step:5:1251 Finally, this is a tad too much for a progress_bar Copying comment to #7686 |
|
The performance of the linalg distributions (lkj, mvn) should improve a bit after we cut a release with the numba caching |
Yup. I thought we already released it, so that's good news. Also pymc-devs/pytensor#1821 as those tend up to show in our pdf/cdfs |
| expected_rv_op_params = { | ||
| "mu": np.array([1.0, 2.0]), | ||
| "cov": quaddist_matrix(chol=pymc_dist_params["chol"]).eval(), | ||
| "cov": quaddist_matrix(chol=pymc_dist_params["chol"]).eval(mode="FAST_COMPILE"), |
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 does this mode need to be specified? Does it work if we're in numba mode?
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.
it does, but bothered me during interactive debugging, because we end up triggering the slow-compilation codebase for a simple constant-fold
|
|
||
| def check_pymc_draws_match_reference_not_numba(self): | ||
| # This calls `check_pymc_draws_match_reference` but only if the default linker is NOT numba. | ||
| # It's used when the draws aren't expected to match in that backend. |
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 aren't draws expected to match in numba? Some rng state issue?
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.
Not an issue, we just don't copy the exact PRNG algorithm that scipy/numpy does for these specific distributions. If JAX were the default backend we wouldn't expect for them to ever match.
This is an exact test, not a distributional one
| assert "This does not respect one of the following constraints: sigma > 0" in out | ||
| else: # "random" | ||
| if isinstance(get_default_mode().linker, NumbaLinker): | ||
| # Numba doesn't raise for negative sigma in NormalRV |
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.
Should it?
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.
Maybe, didn't want to block on that decision though
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.
Related to #7926
Related to PyMC V6 roadmap
Relies on next PyTensor release
PyMC will now be tested on both C and Numba backends, antecipating the switch to Numba as the default backend from PyTensor