Skip to content

Commit

Permalink
Mod: Format code with black.
Browse files Browse the repository at this point in the history
  • Loading branch information
Labbeti committed Dec 14, 2023
1 parent 19f984b commit bd871ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/aac_metrics/functional/bert_score_mrefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ def bert_score_mrefs(
tfmers_logging.set_verbosity(tfmers_verbosity)

# note: torchmetrics returns a float if input contains 1 cand and 1 ref, even in list
if len(duplicated_cands) == 1 and all(isinstance(v, float) for v in sents_scores.values()):
if len(duplicated_cands) == 1 and all(
isinstance(v, float) for v in sents_scores.values()
):
sents_scores = {k: [v] for k, v in sents_scores.items()}

# sents_scores keys: "precision", "recall", "f1"
Expand Down

0 comments on commit bd871ff

Please sign in to comment.