pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

Walking nested graph rewriter

Open aerubanov opened this issue 2 years ago • 4 comments

Implementation of WalkingNestedGraphRewriter which can apply node_rewriter for nodes of nested graphs (Scan and OpFromGraph). Close #529.

aerubanov avatar Dec 14 '23 16:12 aerubanov

Initially I placed WalkingNestedGraphRewriter in pytensor/graph/rewriting/basic.py but faced with cyclic import issue caused by OpFromGraph, so I moved it into separate module. Also not sure about tests, may be we need add more scenarios or use another approach.

aerubanov avatar Dec 14 '23 16:12 aerubanov

Also this changes should allow us to simplify implementation of default moment for CustomSymbolicDist from https://github.com/pymc-devs/pymc/pull/6873

aerubanov avatar Dec 14 '23 16:12 aerubanov

@ricardoV94 could you please take a look on this PR when you will have some time?

aerubanov avatar Dec 20 '23 08:12 aerubanov

@ricardoV94 just friendly reminder about PR )

aerubanov avatar Jan 08 '24 14:01 aerubanov