Skip to content

Commit c453251

Browse files
committed
added precision to load_metrics.py
1 parent 7ffce00 commit c453251

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/load_metric.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import torch.nn as nn
55

66
from .metrics import EntropyPrediction
7-
7+
from .metrics import precision
88

99
class MetricWrapper(nn.Module):
1010
def __init__(self, *metrics):
@@ -39,7 +39,7 @@ def _get_metric(self, key):
3939
case "recall":
4040
raise NotImplementedError("Recall score not implemented yet")
4141
case "precision":
42-
raise NotImplementedError("Precision score not implemented yet")
42+
return precision()
4343
case "accuracy":
4444
raise NotImplementedError("Accuracy score not implemented yet")
4545
case _:

0 commit comments

Comments
 (0)