Skip to content

Ignore named variables that are not traceable in get_vars_in_point_list #6741

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

Merged
merged 1 commit into from
May 30, 2023

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented May 29, 2023

This showed up when trying to do posterior predictive on pymc-devs/pymc-extras#168

It would consider a named_var that is now just a ConstantData or MutableData as having a trace equivalent. The compile_forward_function would then fail because we can't pass constants or shared variables as explicit inputs to a PyTensor function


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

@codecov
Copy link

codecov bot commented May 29, 2023

Codecov Report

Merging #6741 (6b2a352) into main (fbc62d5) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6741      +/-   ##
==========================================
- Coverage   91.99%   91.99%   -0.01%     
==========================================
  Files          95       95              
  Lines       16204    16205       +1     
==========================================
  Hits        14907    14907              
- Misses       1297     1298       +1     
Impacted Files Coverage Δ
pymc/sampling/forward.py 95.47% <100.00%> (+0.02%) ⬆️

... and 1 file with indirect coverage changes

Copy link
Member

@lucianopaz lucianopaz left a comment

Choose a reason for hiding this comment

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

Looks good but why do you include observedRVs? Wont that cause problems for sample_posterior_predictive? Maybe I'm missing something here.

@ricardoV94 ricardoV94 force-pushed the tweak_get_vars_in_point_list branch from be467d1 to 6b2a352 Compare May 30, 2023 07:02
@ricardoV94 ricardoV94 requested a review from lucianopaz May 30, 2023 07:02
Copy link
Member

@lucianopaz lucianopaz left a comment

Choose a reason for hiding this comment

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

Lgtm

@ricardoV94 ricardoV94 merged commit b17a60d into pymc-devs:main May 30, 2023
@ricardoV94 ricardoV94 deleted the tweak_get_vars_in_point_list branch June 5, 2023 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants