-
Notifications
You must be signed in to change notification settings - Fork 595
Add SGI-Bench-1.0 #1358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add SGI-Bench-1.0 #1358
Conversation
…experimental reasoning)
…date readme of SGI-Bench-1.0
| import re | ||
| from typing import Any, Dict, List | ||
| from datasets import load_dataset | ||
| from vlmeval import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid multiple from xxx import *
| return assistant_response | ||
|
|
||
|
|
||
| judge = VLM('o4-mini') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use judge_kwargs and build_judge to construct judge model.
|
|
||
| try: | ||
| images = [decode_base64_to_image(b64) for b64 in row['step_images'] ] | ||
| llm_judge = judge(images, judge_prompt).strip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to use track_progress_rich to parellel run api judge.
| def evaluate(self, eval_file, **judge_kwargs): | ||
| save_dir_last = 'sgi_code_logs' | ||
| global save_dir | ||
| work_dir = judge_kwargs.get('work_dir','./outputs') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not define work dir in the dataset code. Use eval_file path to get the evaluation work dir.
| os.makedirs(os.path.join(tmp_data_dir, "0200"), exist_ok=True) | ||
| os.makedirs(os.path.join(tmp_data_dir, "0236"), exist_ok=True) | ||
|
|
||
| download_file("https://raw.githubusercontent.com/InternScience/SGI-Bench/main/evaluation/task_3_dry_experiment/data/SGI_DryExperiment_0206/t10k-images-idx3-ubyte.gz", tmp_data_dir+"/0206") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Download the extra resource file to the subdir of LMUDataRoot(), instead of the evaluation work dir.
No description provided.