Skip to content

Commit d9b494d

Browse files
ArmavicaricardoV94
authored andcommitted
Fix typo in profile summary printing function
1 parent 686811c commit d9b494d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pytensor/graph/rewriting/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2640,7 +2640,7 @@ def print_profile(cls, stream, prof, level=0):
26402640
gf_rewrites = [
26412641
o
26422642
for o in (
2643-
rewrite.global_rewrites
2643+
rewrite.global_rewriters
26442644
+ list(rewrite.final_rewriters)
26452645
+ list(rewrite.cleanup_rewriters)
26462646
)

tests/test_printing.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,3 +459,10 @@ def test_Print(capsys):
459459

460460
stdout, stderr = capsys.readouterr()
461461
assert "hello" in stdout
462+
463+
464+
def test_summary():
465+
old_profile_optimizer_config_value = pytensor.config.profile_optimizer = True
466+
f = pytensor.function(inputs=[], outputs=[], profile=True)
467+
f.profile.summary()
468+
pytensor.config.profile_optimizer = old_profile_optimizer_config_value

0 commit comments

Comments
 (0)