Skip to content
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

Expand logging test cases for sample_prior_predictive and add return type overloads #7707

Merged
merged 5 commits into from
Mar 3, 2025

Conversation

nataziel
Copy link
Contributor

@nataziel nataziel commented Mar 3, 2025

expand logging test cases for sample_prior_predictive & add return type overloads

Description

Expanded logging test cases to clarify expected behaviour/purpose of logged message in sample_prior_predictive

Added return type overloads while I'm in there for useability (and to remove a bunch of instances of assert isinstance(trace, az.InferenceData) from my own code 😂)

Related Issue

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
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

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

@github-actions github-actions bot added the bug label Mar 3, 2025
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.67%. Comparing base (d1aff0b) to head (36e861e).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #7707   +/-   ##
=======================================
  Coverage   92.67%   92.67%           
=======================================
  Files         107      107           
  Lines       18319    18323    +4     
=======================================
+ Hits        16977    16981    +4     
  Misses       1342     1342           
Files with missing lines Coverage Δ
pymc/sampling/forward.py 96.32% <100.00%> (+0.06%) ⬆️

@nataziel
Copy link
Contributor Author

nataziel commented Mar 3, 2025

Happy to split the overload addition to a separate PR if it's preferrable

@nataziel nataziel changed the title correct sampled variables in sample_prior_predictive log call & add return type overloads expand logging test cases for sample_prior_predictive & add return type overloads Mar 3, 2025
@ricardoV94 ricardoV94 merged commit 3ccff92 into pymc-devs:main Mar 3, 2025
25 checks passed
@ricardoV94 ricardoV94 changed the title expand logging test cases for sample_prior_predictive & add return type overloads Expand logging test cases for sample_prior_predictive and add return type overloads Mar 3, 2025
@ricardoV94
Copy link
Member

Thanks @nataziel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: pm.sample_prior_predictive reports it will sample all volatile basic RVs even when var_names is supplied
2 participants