From bb917def1e557d9d7ab62e6dbfccb7f05b9ba532 Mon Sep 17 00:00:00 2001 From: SkafteNicki Date: Mon, 21 Mar 2022 14:49:37 +0100 Subject: [PATCH] fix mypy --- torchmetrics/image/sam.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/torchmetrics/image/sam.py b/torchmetrics/image/sam.py index fa6f03f06cb..7281de59a50 100644 --- a/torchmetrics/image/sam.py +++ b/torchmetrics/image/sam.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from typing import Any, Dict, List +from typing import Any, List from torch import Tensor from typing_extensions import Literal @@ -61,9 +61,9 @@ class SpectralAngleMapper(Metric): def __init__( self, reduction: Literal["elementwise_mean", "sum", "none"] = "elementwise_mean", - **kwargs: Dict[str, Any], + **kwargs: Any, ) -> None: - super().__init__(compute_on_step=None, **kwargs) + super().__init__(**kwargs) rank_zero_warn( "Metric `SpectralAngleMapper` will save all targets and predictions in the buffer." " For large datasets, this may lead to a large memory footprint."