Skip to content

Avoid runtime broadcast error due to dot_to_mul rewrite#1783

Merged
ricardoV94 merged 2 commits intopymc-devs:mainfrom
ricardoV94:dot_to_mul_bug
Dec 9, 2025
Merged

Avoid runtime broadcast error due to dot_to_mul rewrite#1783
ricardoV94 merged 2 commits intopymc-devs:mainfrom
ricardoV94:dot_to_mul_bug

Conversation

@ricardoV94
Copy link
Copy Markdown
Member

For convenience also allow Ellipsis in specify_shape.

Closes #1782

@ricardoV94 ricardoV94 added bug Something isn't working graph rewriting labels Dec 9, 2025
@ricardoV94
Copy link
Copy Markdown
Member Author

ricardoV94 commented Dec 9, 2025

@tomicapretto or @ivanistheone, could either of you check if the patch fixes the original problem?

You may need to apply the changes locally because there are probably other major breaking changes in pytensor main related to pymc/bambi

@ricardoV94 ricardoV94 force-pushed the dot_to_mul_bug branch 2 times, most recently from e945e92 to c90954f Compare December 9, 2025 11:29
@tomicapretto
Copy link
Copy Markdown
Contributor

@ricardoV94 yes, I'll reply in a moment

@ivanistheone
Copy link
Copy Markdown
Contributor

could either of you check if the patch fixes the original problem?

Everything worked fine after when latest pymc, bambi and pip install -e pytensor from the branch dot_to_mul_bug.

You may need to apply the changes locally because there are probably other major breaking changes in pytensor main related to pymc/bambi

I had to add from pytensor.sparse.math import sp_sum to the top of pytensor/sparse/basic.py because pymc was looking for it there.

@ricardoV94
Copy link
Copy Markdown
Member Author

Great

Copy link
Copy Markdown
Contributor

@tomicapretto tomicapretto left a comment

Choose a reason for hiding this comment

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

I confirm I can run the original example, shared in the issue, without problem (after adjusting one import)..
Thanks @ricardoV94 !

@ricardoV94 ricardoV94 merged commit 1d13f8c into pymc-devs:main Dec 9, 2025
56 checks passed
@ricardoV94 ricardoV94 deleted the dot_to_mul_bug branch December 9, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working graph rewriting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: local_dot_to_mul leads to invalid runtime broadcast error

3 participants