From 019c61e9f563cc9784f66b62888667ce4a4c218c Mon Sep 17 00:00:00 2001 From: zhulinJulia24 Date: Wed, 9 Apr 2025 10:42:47 +0800 Subject: [PATCH] update --- opencompass/datasets/subjective/commonbench.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/opencompass/datasets/subjective/commonbench.py b/opencompass/datasets/subjective/commonbench.py index e8af2361..dbe5b7ae 100644 --- a/opencompass/datasets/subjective/commonbench.py +++ b/opencompass/datasets/subjective/commonbench.py @@ -8,7 +8,7 @@ from opencompass.registry import DICT_POSTPROCESSORS from .utils import get_judgeanswer_and_reference -def post_process_mtbench(judgement: str): +def post_process(judgement: str): """Input a string like below: xxx[[5]]xxx, and extract the score @@ -38,8 +38,6 @@ def get_capability_results(judged_answers, references): s = total_score / capability_counts[capability] s = round(s, 2) capability_avg_ratings[capability] = s - columns = list(capability_avg_ratings.keys()) - columns.insert(0, columns.pop(columns.index('total'))) return capability_avg_ratings @@ -48,7 +46,7 @@ def get_capability_results(judged_answers, references): def commonbench_postprocess( output: dict, output_path: str, - post_process: Optional[callable] = post_process_mtbench, + post_process: Optional[callable] = post_process, ) -> dict: judged_answers, references = get_judgeanswer_and_reference( output, output_path, post_process)