Skip to content

Commit 3bac4de

Browse files
SangdaeNameunwoosh
authored andcommitted
20220511 metric change
1 parent ad032dd commit 3bac4de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

external/anomaly/ote_anomalib/callbacks/progress.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _get_progress(self, stage: str = "train") -> float:
116116
def on_validation_epoch_end(self, trainer, pl_module):
117117
super().on_validation_epoch_end(trainer, pl_module)
118118
score = None
119-
metric = self.update_progress_callback.metric if hasattr(self.update_progress_callback, 'metric') else None
119+
metric = getattr(self.update_progress_callback, 'metric', None)
120120
if metric in list(trainer.logged_metrics.keys()):
121121
score = float(trainer.logged_metrics[metric])
122122
progress = int(self._get_progress('predict'))

0 commit comments

Comments
 (0)