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:
ChoMinSung 2022-07-22 22:33:27 +09:00 committed by GitHub
parent 4588a79e2a
commit 0b842b9ac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -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",

View File

@ -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__,