Skip to content

Commit

Permalink
Add versbose output to xlsum
Browse files Browse the repository at this point in the history
  • Loading branch information
polm committed Sep 29, 2023
1 parent 8ec75c1 commit 4feb454
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lm_eval/tasks/ja/xlsum_ja.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,21 @@ def construct_requests(self, doc, ctx):
def process_results(self, doc, results):
continuation = results[0]
ground_truth = doc["summary"]
return {
out = {
"rouge2": (
continuation,
ground_truth,
)
}
# add verbose output
out["details"] = {
# this isn't really a question, but keeping it this way for
# consistency
"question": doc["text"],
"response": continuation,
"gold": doc["summary"]
}
return out

def aggregation(self):
return {
Expand Down

0 comments on commit 4feb454

Please sign in to comment.