Skip to content

Conversation

@ricardoV94
Copy link
Member

Description

The provided output could be silently ignored and replaced by the new output of the vectorized node.

Also avoids vectorizing multiple-output nodes when none of the unreplaced outputs are needed.

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):
@ricardoV94 ricardoV94 added bug Something isn't working vectorization labels Jan 4, 2024
@ricardoV94 ricardoV94 changed the title Fix vectorize_graph issue when replacements were provided for some but not all outputs of a multi-output node Fix vectorize_graph issue when replacements were provided only some outputs of a multi-output node Jan 4, 2024
@ricardoV94 ricardoV94 changed the title Fix vectorize_graph issue when replacements were provided only some outputs of a multi-output node Fix vectorize_graph issue when replacements were provided only some outputs of a node Jan 4, 2024
@ricardoV94 ricardoV94 changed the title Fix vectorize_graph issue when replacements were provided only some outputs of a node Fix vectorize_graph bug when replacements were provided only some outputs of a node Jan 4, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e180927) 80.92% compared to head (77b8389) 80.92%.

Additional details and impacted files

Impacted file tree graph

@@ Coverage Diff @@ ## main #570 +/- ## ======================================= Coverage 80.92% 80.92% ======================================= Files 162 162 Lines 46524 46526 +2 Branches 11375 11376 +1 ======================================= + Hits 37648 37650 +2  Misses 6653 6653 Partials 2223 2223 
Files Coverage Δ
pytensor/graph/basic.py 89.08% <100.00%> (ø)
pytensor/graph/replace.py 85.14% <100.00%> (+0.30%) ⬆️
@ricardoV94 ricardoV94 changed the title Fix vectorize_graph bug when replacements were provided only some outputs of a node Fix vectorize_graph bug when replacements were provided for only some outputs of a node Jan 5, 2024
…utputs of a node The provided output could be silently ignored and replaced by the new output of the vectorized node. The changes also avoid vectorizing multiple-output nodes when none of the unreplaced outputs are needed.
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 0ebc83b into pymc-devs:main Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working vectorization

4 participants