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

Make do interventions shared variables by default #7596

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Nov 29, 2024

This behavior should be more intuitive, since do interventions create Data containers, and users expect those to be mutable by default. This also alleviates some issues related to sample_posterior_predictive that currently does not look for sources of mutability on constants:

Closes #6977 (I tested the MWE locally)
Related to #7069

We could consider something similar for pm.observe but that doesn't create data containers at all right now, so it's a tad less relevant and would require more changes.


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

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.83%. Comparing base (7c369c8) to head (d14cf22).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7596      +/-   ##
==========================================
- Coverage   92.84%   92.83%   -0.01%     
==========================================
  Files         106      106              
  Lines       17719    17723       +4     
==========================================
+ Hits        16451    16454       +3     
- Misses       1268     1269       +1     
Files with missing lines Coverage Δ
pymc/model/transform/conditioning.py 95.91% <100.00%> (+0.17%) ⬆️

... and 1 file with indirect coverage changes

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.

Posterior predictive doesn't resample intermediate Deterministics of intervened variables
1 participant