We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
OpFromGraph
__eq__
__hash__
This allows merging duplicated nodes as well as comparing graph equality.
import pytensor import pytensor.tensor as pt from pytensor.compile.builders import OpFromGraph from pytensor.graph.basic import equal_computations x = pt.scalar("x") out1 = OpFromGraph([x], [x + 1])(x) out2 = OpFromGraph([x], [x + 1])(x) assert equal_computations([out1], [out2])
It should pass the assert. It fails because out1.owner.op == out2.owner.op evaluates to False. We can probably do something very similar to Scan:
out1.owner.op == out2.owner.op
Scan
pytensor/pytensor/scan/op.py
Lines 1254 to 1320 in 4b41e09
The text was updated successfully, but these errors were encountered:
OpFromGraph.__eq__
No branches or pull requests
Description
This allows merging duplicated nodes as well as comparing graph equality.
It should pass the assert. It fails because
out1.owner.op == out2.owner.op
evaluates to False. We can probably do something very similar toScan
:pytensor/pytensor/scan/op.py
Lines 1254 to 1320 in 4b41e09
The text was updated successfully, but these errors were encountered: