Open brandonwillard opened 2 years ago
@brandonwillard can you please share an example of a large Scan
graph with which I can replicate this issue locally? I would like to attempt to solve this bug.
@brandonwillard can you please share an example of a large
Scan
graph with which I can replicate this issue locally? I would like to attempt to solve this bug.
A useful MWE in this situation would, for example, demonstrate how aesara.compile.builders.infer_shape
is stack bound (e.g. turn the issue into a bug via a RecursionError
). Such an example could also serve as a good unit test for the changes requested by this issue.
Unfortunately, I don't have one on hand, but, regardless, creating one would serve as good first steps toward solving this issue, especially since it could clarify some details regarding exactly when/how the current approach becomes problematic.
aesara.compile.builders.infer_shape
recurses in a way that's not optimal for large graphs. This is especially problematic for largeScan
graphs, sinceScan.infer_shape
uses the aforementionedinfer_shape
function.