-
Notifications
You must be signed in to change notification settings - Fork 129
BUG: Rewrite failure local_pow_to_nested_squaring
when static type shape changes
#456
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
Comments
You guys have quite a number of dependencies... |
This one is a bit tricky, the rewrite gets to the point where it tries to replace
The fix is not to fail, but to get out graciously. For the time being, do you have any idea where that surprising parameter with If you know you are creating stuff with |
Reproducible snippet: import pytensor
import pytensor.tensor as pt
from pytensor.graph.basic import Apply
x = pt.vector("x", shape=(1,))
# Create a node manually that does not know the output should have `shape=(1,)`
node = Apply(pt.pow, [x, pt.as_tensor([2.0])], [pt.tensor(shape=(None,))])
y = node.outputs[0]
y.eval({x: 1.0}) # AssertionError |
Rewrite failure due to: local_pow_to_nested_squaring
local_pow_to_nested_squaring
when static type shape changes
Should be patched by #461 |
Thanks @ricardoV94! We don't know where that surprising parameter comes from. We'll take a look at what is responsible for this |
Describe the issue:
We are using PyMC to build a model with a custom distribution and likelihood for the hssm package. The code ran fine with 5.6.x, but after updating PyMC dependency to 5.8.x, the code broke under some circumstances with certain parameter settings at the sampling stage with this error:
Reproducable code example:
Since there is only one line with pt.pow(*, 3), we found the offending code seems to be this line:
where
tt
can take negative values, which we thought might be where the composite type came from. However, even after ensuring that tt is only positive with something likett = pt.maximum(tt, 1e-25)
, the problem persists. After changing optimizer setting too2
, the problem also goes away.To reproduce the error, first, install
hssm
via:The code that produces the error:
Error message:
No response
PyTensor version information:
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: