pymc
pymc copied to clipboard
Report divergences from JAX samplers
Description
PyMC users are used to getting an immediate report when there are divergences in the standard NUTS sampler. So I added a warning to be printed in case of divergence.
Related Issue
- [x] Closes #7041
Checklist
- [ ] Checked that the pre-commit linting/style checks pass
- [ ] Included tests that prove the fix is effective or that the new feature works
- [ ] Added necessary documentation (docstrings and/or example notebooks)
- [ ] If you are a pro: each commit corresponds to a relevant logical change
Type of change
- [ ] New feature / enhancement
- [x] Bug fix
- [ ] Documentation
- [ ] Maintenance
- [ ] Other (please specify):
📚 Documentation preview 📚: https://pymc--7094.org.readthedocs.build/en/7094/
:sparkling_heart: Thanks for opening this pull request! :sparkling_heart: The PyMC community really appreciates your time and effort to contribute to the project. Please make sure you have read our Contributing Guidelines and filled in our pull request template to the best of your ability.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
7bb2ccd) 92.21% compared to head (30a9c14) 92.21%. Report is 2 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #7094 +/- ##
=======================================
Coverage 92.21% 92.21%
=======================================
Files 101 101
Lines 16912 16916 +4
=======================================
+ Hits 15595 15599 +4
Misses 1317 1317
| Files | Coverage Δ | |
|---|---|---|
| pymc/sampling/mcmc.py | 87.79% <100.00%> (+0.10%) |
:arrow_up: |
@mohammed052 it seems like this issue was already being worked out in https://github.com/pymc-devs/pymc/pull/7051
In this case it should be fine for you to overtake it, but in general you don't want to do that as we will likely give priority to the older PRs. In any case the same comment I did here, applies to your changes: https://github.com/pymc-devs/pymc/pull/7051#issuecomment-1845537979