Fix mypy errors attributed to `pytorch_lightning/profilers/advanced.py` (#13792)
Co-authored-by: otaj <6065855+otaj@users.noreply.github.com>
This commit is contained in:
parent
4588a79e2a
commit
0b842b9ac1
|
@ -59,7 +59,6 @@ module = [
|
|||
"pytorch_lightning.demos.mnist_datamodule",
|
||||
"pytorch_lightning.loggers.comet",
|
||||
"pytorch_lightning.loggers.neptune",
|
||||
"pytorch_lightning.profilers.advanced",
|
||||
"pytorch_lightning.profilers.base",
|
||||
"pytorch_lightning.profilers.pytorch",
|
||||
"pytorch_lightning.profilers.simple",
|
||||
|
|
|
@ -17,7 +17,7 @@ import io
|
|||
import logging
|
||||
import pstats
|
||||
from pathlib import Path
|
||||
from typing import Dict, Optional, Union
|
||||
from typing import Dict, Optional, Tuple, Union
|
||||
|
||||
from pytorch_lightning.profilers.profiler import Profiler
|
||||
|
||||
|
@ -82,7 +82,7 @@ class AdvancedProfiler(Profiler):
|
|||
super().teardown(stage=stage)
|
||||
self.profiled_actions = {}
|
||||
|
||||
def __reduce__(self):
|
||||
def __reduce__(self) -> Tuple:
|
||||
# avoids `TypeError: cannot pickle 'cProfile.Profile' object`
|
||||
return (
|
||||
self.__class__,
|
||||
|
|
Loading…
Reference in New Issue