Spaces:
Runtime error
Runtime error
Add comet prefix to result dict's key
Browse filesWhen using `evaluate.combine['bleu', 'comet']`, sometimes it's hard to know which keys belongs to which metric. Adding the prefix explicitly should help.
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 {"
|
|
|
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}
|