pymc-devs / pymc

Bayesian Modeling and Probabilistic Programming in Python
https://docs.pymc.io/
Other
8.62k stars 1.99k forks source link

Added a helper function to print intermediate values #7146

Open itsdivya1309 opened 7 months ago

itsdivya1309 commented 7 months ago

Description

Added a helper function, print_value that uses Print Op to print intermediate values and help in model debugging.

Related Issue

Checklist

Type of change


📚 Documentation preview 📚: https://pymc--7146.org.readthedocs.build/en/7146/

welcome[bot] commented 7 months ago

Thank You Banner] :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[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 92.34%. Comparing base (4c3ec36) to head (b41805c). Report is 1 commits behind head on main.

:exclamation: Current head b41805c differs from pull request most recent head d4df94f. Consider uploading reports for the commit d4df94f to get more accurate results

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pymc-devs/pymc/pull/7146/graphs/tree.svg?width=650&height=150&src=pr&token=JFuXtOJ4Cb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs)](https://app.codecov.io/gh/pymc-devs/pymc/pull/7146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) ```diff @@ Coverage Diff @@ ## main #7146 +/- ## ========================================== + Coverage 92.28% 92.34% +0.06% ========================================== Files 100 101 +1 Lines 16899 16935 +36 ========================================== + Hits 15595 15639 +44 + Misses 1304 1296 -8 ``` | [Files](https://app.codecov.io/gh/pymc-devs/pymc/pull/7146?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) | Coverage Δ | | |---|---|---| | [pymc/model/core.py](https://app.codecov.io/gh/pymc-devs/pymc/pull/7146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs#diff-cHltYy9tb2RlbC9jb3JlLnB5) | `91.89% <40.00%> (-0.34%)` | :arrow_down: | ... and [39 files with indirect coverage changes](https://app.codecov.io/gh/pymc-devs/pymc/pull/7146/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs)
twiecki commented 7 months ago

This is great, thanks @itsdivya1309. Can you add a short test?

itsdivya1309 commented 6 months ago

This is great, thanks @itsdivya1309. Can you add a short test?

Hi! I have added a test case, please review. Thanks.