File tree 3 files changed +12
-2
lines changed
3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
25
25
26
26
- Changed minimum supported Pytorch version from 1.8 to 1.10 ([ #2145 ] ( https://github.com/Lightning-AI/torchmetrics/pull/2145 ) )
27
27
28
+ ### Deprecated
29
+
30
+ - Deprecated ` metric._update_called ` ([ #2141 ] ( https://github.com/Lightning-AI/torchmetrics/pull/2141 ) )
31
+
28
32
29
33
### Removed
30
34
Original file line number Diff line number Diff line change @@ -348,6 +348,7 @@ class MeanAveragePrecision(Metric):
348
348
"plot_upper_bound" ,
349
349
"plot_legend_name" ,
350
350
"metric_state" ,
351
+ "_update_called" ,
351
352
# below is added for specifically for this metric
352
353
"coco" ,
353
354
"cocoeval" ,
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ class Metric(Module, ABC):
87
87
"plot_upper_bound" ,
88
88
"plot_legend_name" ,
89
89
"metric_state" ,
90
+ "_update_called" ,
90
91
]
91
92
is_differentiable : Optional [bool ] = None
92
93
higher_is_better : Optional [bool ] = None
@@ -168,8 +169,12 @@ def __init__(
168
169
169
170
@property
170
171
def _update_called (self ) -> bool :
171
- # TODO: this is needed for internal lightning, remove after v0.12 and update on lightning side
172
- return self ._update_count > 0
172
+ rank_zero_warn (
173
+ "This property will be removed in 2.0.0. Use `Metric.updated_called` instead." ,
174
+ DeprecationWarning ,
175
+ stacklevel = 2 ,
176
+ )
177
+ return self .update_called
173
178
174
179
@property
175
180
def update_called (self ) -> bool :
You can’t perform that action at this time.
0 commit comments