From 46cd393170d89d20f33a3e0cc727285c5dc818a7 Mon Sep 17 00:00:00 2001 From: jirka Date: Mon, 5 Aug 2024 15:47:51 +0200 Subject: [PATCH] ignore --- src/torchmetrics/wrappers/tracker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/torchmetrics/wrappers/tracker.py b/src/torchmetrics/wrappers/tracker.py index 812b736ccef..2a32ee575fe 100644 --- a/src/torchmetrics/wrappers/tracker.py +++ b/src/torchmetrics/wrappers/tracker.py @@ -125,7 +125,7 @@ def __init__( f"The metric '{metric.__class__.__name__}' does not have a 'higher_is_better' attribute." " Please provide the `maximize` argument explicitly." ) - self.maximize = metric.higher_is_better + self.maximize = metric.higher_is_better # type: ignore[assignment] # this is false alarm elif isinstance(metric, MetricCollection): self.maximize = [] for name, m in metric.items(): @@ -134,7 +134,7 @@ def __init__( f"The metric '{name}' in the MetricCollection does not have a 'higher_is_better' attribute." " Please provide the `maximize` argument explicitly." ) - self.maximize.append(m.higher_is_better) + self.maximize.append(m.higher_is_better) # type: ignore[arg-type] # this is false alarm else: rank_zero_warn( "The default value for `maximize` will be changed from `True` to `None` in v1.7.0 of TorchMetrics,"