Skip to content

Commit e3f1b8c

Browse files
committed
update __reduce__ function annotion
1 parent d4168b2 commit e3f1b8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pytorch_lightning/profilers/advanced.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import logging
1818
import pstats
1919
from pathlib import Path
20-
from typing import Dict, Optional, Union
20+
from typing import Dict, Optional, Tuple, Union
2121

2222
from pytorch_lightning.profilers.profiler import Profiler
2323

@@ -82,7 +82,7 @@ def teardown(self, stage: Optional[str] = None) -> None:
8282
super().teardown(stage=stage)
8383
self.profiled_actions = {}
8484

85-
def __reduce__(self):
85+
def __reduce__(self) -> Tuple:
8686
# avoids `TypeError: cannot pickle 'cProfile.Profile' object`
8787
return (
8888
self.__class__,

0 commit comments

Comments
 (0)