Skip to content

Commit

Permalink
Add generate_submission_file function to cc_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pufanyi committed Mar 15, 2024
1 parent b1f2be5 commit a519fc1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lmms_eval/tasks/mmbench/cc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

eval_logger = logging.getLogger("lmms-eval")
from lmms_eval.tasks.mmbench.mmbench_evals import MMBench_Evaluator
from lmms_eval.tasks._task_utils.file_utils import generate_submission_file

with open(Path(__file__).parent / "mmbench_cn.yaml", "r") as f:
raw_data = f.readlines()
Expand Down Expand Up @@ -66,9 +67,9 @@ def mmbench_cn_cc_process_results(doc, results):
return data


def mmbench_cn_cc_aggregate_results(results):
def mmbench_cn_cc_aggregate_results(results, args):
df = pd.DataFrame(results)
os.makedirs("./submissions", exist_ok=True)
with pd.ExcelWriter("./submissions/mmbench_cn_cc_results.xlsx") as writer:
file = generate_submission_file("mmbench_cn_cc_results.xlsx", args)
with pd.ExcelWriter(file) as writer:
df.to_excel(writer, index=False)
eval_logger.info(f"Saved results to mmbench_cn_cc_results.xlsx")
eval_logger.info(f"Saved results to {file}")

0 comments on commit a519fc1

Please sign in to comment.