Skip to content
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

Fix: None value handler for seedbench-2 evaluation code #166

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lmms_eval/tasks/seedbench_2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def parse_choice_img(choice: str, img_token: str):

def seed_doc_to_text(doc, model_specific_kwargs=None):
question = doc["question"]
if model_specific_kwargs is None:
return question
question.replace("<img>", model_specific_kwargs["img_token"])
question += "\n" + f"A. {parse_choice_img(doc['choice_a'], model_specific_kwargs['img_token'])}\n"
question += f"B. {parse_choice_img(doc['choice_b'], model_specific_kwargs['img_token'])}\n"
Expand Down
Loading