alvations commited on
Commit
2fcb6b6
1 Parent(s): d8e8baa

Add comet prefix to result dict's key

Browse files

When using `evaluate.combine['bleu', 'comet']`, sometimes it's hard to know which keys belongs to which metric. Adding the prefix explicitly should help.

Files changed (1) hide show
  1. comet.py +1 -1
comet.py CHANGED
@@ -142,4 +142,4 @@ class COMET(evaluate.Metric):
142
  data = {"src": sources, "mt": predictions, "ref": references}
143
  data = [dict(zip(data, t)) for t in zip(*data.values())]
144
  scores, mean_score = self.scorer.predict(data, gpus=gpus, progress_bar=progress_bar)
145
- return {"mean_score": mean_score, "scores": scores}
 
142
  data = {"src": sources, "mt": predictions, "ref": references}
143
  data = [dict(zip(data, t)) for t in zip(*data.values())]
144
  scores, mean_score = self.scorer.predict(data, gpus=gpus, progress_bar=progress_bar)
145
+ return {"comet_mean_score": mean_score, "comet_segment_scores": scores}