Skip to content

Commit

Permalink
Suppress optimizer verbose from MergeOptimizer when compiling inner f…
Browse files Browse the repository at this point in the history
…graph C code of Composite

Otherwise, it will show up everytime a Composite has been cached by th C backend
  • Loading branch information
ricardoV94 authored and michaelosthege committed Jun 16, 2023
1 parent 2db3760 commit b9c4f20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytensor/scalar/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4236,7 +4236,8 @@ def fgraph(self):
# the fgraph to be set to the variable as we need to pickle
# them for the cache of c module to work.
fgraph = FunctionGraph(self.inputs, self.outputs)
MergeOptimizer().rewrite(fgraph)
with config.change_flags(optimizer_verbose=False):
MergeOptimizer().rewrite(fgraph)
for node in fgraph.apply_nodes:
if not isinstance(node.op, ScalarOp):
raise TypeError(
Expand Down

0 comments on commit b9c4f20

Please sign in to comment.