elshehawy commited on
Commit
7bc9a58
β€’
1 Parent(s): 1033026

add tqdm to metrics.py

Browse files
Files changed (1) hide show
  1. metrics.py +2 -1
metrics.py CHANGED
@@ -1,4 +1,5 @@
1
  from sentence_transformers import util
 
2
 
3
  def calc_recall(true_pos, false_neg, eps=1e-8):
4
  return true_pos / (true_pos + false_neg + eps)
@@ -25,7 +26,7 @@ def calc_metrics(true, predicted, model, threshold=0.95, eps=1e-8):
25
 
26
  i = 0
27
  total = len(true)
28
- for j, (true_ents, pred_ents) in enumerate(zip(true, predicted)):
29
  i += 1
30
  # print(f'{i}/{total}')
31
  # print('----------------------------')
 
1
  from sentence_transformers import util
2
+ from tqdm import tqdm
3
 
4
  def calc_recall(true_pos, false_neg, eps=1e-8):
5
  return true_pos / (true_pos + false_neg + eps)
 
26
 
27
  i = 0
28
  total = len(true)
29
+ for j, (true_ents, pred_ents) in tqdm(enumerate(zip(true, predicted))):
30
  i += 1
31
  # print(f'{i}/{total}')
32
  # print('----------------------------')