Add comet prefix to result dict's key

#3
by alvations - opened
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}