Skip to content

Commit 097e647

Browse files
authored
Update src/lightning/pytorch/profilers/advanced.py
1 parent 660c269 commit 097e647

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lightning/pytorch/profilers/advanced.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def summary(self) -> str:
116116
@override
117117
def teardown(self, stage: Optional[str]) -> None:
118118
super().teardown(stage=stage)
119-
self.profiled_actions = defaultdict(cProfile.Profile)
119+
self.profiled_actions.clear()
120120

121121
def __reduce__(self) -> tuple:
122122
# avoids `TypeError: cannot pickle 'cProfile.Profile' object`

0 commit comments

Comments
 (0)