mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00

* add calm dataset * modify config max_out_len * update README * Modify README * update README * update README * update README * update README * update README * add summarizer and modify readme * delete summarizer config comment * update summarizer * modify same response to all questions * update README
10 lines
373 B
Python
10 lines
373 B
Python
def compute_acc(gt_list, pred_list):
|
|
correct_num = 0
|
|
for pred, gold in zip(pred_list, gt_list):
|
|
kept_pred = round(pred, 4) if pred != None else pred
|
|
kept_gold = round(gold, 4)
|
|
if kept_pred == kept_gold:
|
|
correct_num += 1
|
|
acc = correct_num / len(gt_list)
|
|
return acc
|