omerlevy commited on
Commit
8b4bfe0
1 Parent(s): 07582b4

Update metrics/bart_score.py

Browse files
Files changed (1) hide show
  1. metrics/bart_score.py +3 -3
metrics/bart_score.py CHANGED
@@ -23,10 +23,10 @@ def get_scorers():
23
 
24
 
25
  def compute_bart_score_for_scorer(predictions, references, scorer_name, scorer):
26
- #precisions = np.array(scorer.score(references, predictions, batch_size=10))
27
- recalls = np.array(scorer.score(predictions, references, batch_size=10))
28
  #f_scores = 0.5 * (precisions + recalls)
29
- baselines = np.array(scorer.score(references, references, batch_size=10))
30
  normalized = baselines / recalls
31
  diffs = recalls - baselines
32
  expdiffs = np.exp(diffs)
 
23
 
24
 
25
  def compute_bart_score_for_scorer(predictions, references, scorer_name, scorer):
26
+ #precisions = np.array(scorer.score(references, predictions, batch_size=4))
27
+ recalls = np.array(scorer.score(predictions, references, batch_size=4))
28
  #f_scores = 0.5 * (precisions + recalls)
29
+ baselines = np.array(scorer.score(references, references, batch_size=4))
30
  normalized = baselines / recalls
31
  diffs = recalls - baselines
32
  expdiffs = np.exp(diffs)