Commit 5a62765b authored by Zdenek Kasner's avatar Zdenek Kasner
Browse files

Revert changes in base.py

parent 56b2aa94
......@@ -768,7 +768,7 @@ class PromptSourceTask(Task):
metric in self.CONFIGURED_PS_METRICS
), "Unexpected metric. Add it, or use a task-specific solution."
if metric == "BLEU":
out["bleu"] = metrics.bleu([(target, pred)])
out["bleu"] = (target, pred)
if metric == "ROUGE":
# TODO: This computes all rouge sub-metrics. Find a generic
# way to handle user specified rouge sub-metrics to avoid extra
......@@ -819,7 +819,7 @@ class PromptSourceTask(Task):
if metric == "Accuracy":
out["acc"] = mean
if metric == "BLEU":
out["bleu"] = mean
out["bleu"] = metrics.bleu
if metric == "ROUGE":
# TODO: Find a generic way to handle user specified rouge metrics.
out["rouge1_precision"] = mean
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment