Skip to content

Commit

Permalink
chore: black
Browse files Browse the repository at this point in the history
  • Loading branch information
zhudotexe committed Jun 19, 2024
1 parent 95deef8 commit 7e741e4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fanoutqa/eval/scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,12 @@ def score_rouge(self) -> Tuple[RougeScore, Dict[str, RougeScore]]:
results = self.rouge.score(str_answer(q.answer), str_answer(a["answer"]))
for k, v in results.items():
scores[k].append(v)
raw_scores[q.id] = RougeScore(**{
k: RougeScorePart(precision=v.precision, recall=v.recall, fscore=v.fmeasure) for k, v in results.items()
})
raw_scores[q.id] = RougeScore(
**{
k: RougeScorePart(precision=v.precision, recall=v.recall, fscore=v.fmeasure)
for k, v in results.items()
}
)

assert all(len(v) == self.eval_len for v in scores.values())
assert len(raw_scores) == self.eval_len
Expand Down

0 comments on commit 7e741e4

Please sign in to comment.