Skip to content

Fix local_subtensor_rv_lift rewrite bug with vector parameters #281

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 2 commits into from
Apr 24, 2023

Conversation

ricardoV94
Copy link
Member

  • Also allows rewrite to work with multivariate variables, when indexing does not act on support dims.

Closes #230

CC @jessegrabowski

@ricardoV94 ricardoV94 added the bug Something isn't working label Apr 21, 2023
@ricardoV94 ricardoV94 force-pushed the fix_subtensor_rv_lift branch from 408a993 to b99ff82 Compare April 21, 2023 11:54
@ricardoV94 ricardoV94 force-pushed the fix_subtensor_rv_lift branch from b99ff82 to e046a9c Compare April 24, 2023 08:58
Also allow rewrite to work with multivariate variables, when indexing does not act on support dims.
@ricardoV94 ricardoV94 force-pushed the fix_subtensor_rv_lift branch from e046a9c to 22de86b Compare April 24, 2023 08:59
@codecov-commenter
Copy link

Codecov Report

Merging #281 (22de86b) into main (e67dc97) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #281   +/-   ##
=======================================
  Coverage   80.47%   80.47%           
=======================================
  Files         171      171           
  Lines       45433    45440    +7     
  Branches    11094    11095    +1     
=======================================
+ Hits        36560    36567    +7     
  Misses       6640     6640           
  Partials     2233     2233           
Impacted Files Coverage Δ
pytensor/tensor/random/rewriting/basic.py 93.89% <100.00%> (+0.34%) ⬆️

Copy link
Member

@michaelosthege michaelosthege left a comment

Choose a reason for hiding this comment

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

size/shape related rewrites are always hard to read, and in this case unfortunately also the test.

But I think I understood about 80 % and it LGTM 👍

@ricardoV94 ricardoV94 merged commit b8e939e into pymc-devs:main Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subtensor RV lift does not work correctly with Categorical RVs
3 participants