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

Ignore inner unused RNG inputs in collect_default_updates #7658

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Jan 25, 2025

It closes the PyMC-side of #7657.

The example there will still not work due to the OpFromGraph L_op actually re-introducing the random variable (but not the next rng update). That's a PyTensor question, that may be addressed by pymc-devs/pytensor#1174

These changes still make sense on their own.

Closes #7657


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

Copy link

codecov bot commented Jan 25, 2025

Codecov Report

Attention: Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.70%. Comparing base (fa43eba) to head (8d26d62).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pymc/pytensorf.py 95.23% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7658      +/-   ##
==========================================
- Coverage   92.78%   92.70%   -0.09%     
==========================================
  Files         107      107              
  Lines       18196    18391     +195     
==========================================
+ Hits        16884    17050     +166     
- Misses       1312     1341      +29     
Files with missing lines Coverage Δ
pymc/pytensorf.py 90.67% <95.23%> (+<0.01%) ⬆️

... and 7 files with indirect coverage changes

Copy link
Member

@jessegrabowski jessegrabowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo, otherwise looks great

@ricardoV94 ricardoV94 removed the bug label Jan 25, 2025
@ricardoV94 ricardoV94 force-pushed the ignore_unused_ofg_rng branch from 16d5f13 to 8d26d62 Compare January 28, 2025 10:59
@ricardoV94 ricardoV94 merged commit e0e7511 into pymc-devs:main Jan 28, 2025
4 of 6 checks passed
@ricardoV94 ricardoV94 deleted the ignore_unused_ofg_rng branch January 28, 2025 10:59
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.

collect_default_updates should ignore unused rng inputs to OpFromGraph
2 participants