diff --git a/pyproject.toml b/pyproject.toml index eb9b025e36..a0960c58f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", diff --git a/src/pytorch_lightning/profilers/advanced.py b/src/pytorch_lightning/profilers/advanced.py index 214d67e52e..90fddc8074 100644 --- a/src/pytorch_lightning/profilers/advanced.py +++ b/src/pytorch_lightning/profilers/advanced.py @@ -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__,