| def doc_to_text(doc, lmms_eval_specific_kwargs=None): | |
| if lmms_eval_specific_kwargs is None: | |
| return doc["question"] | |
| question = doc["question"] | |
| pre_prompt = lmms_eval_specific_kwargs.get("pre_prompt", "") | |
| post_prompt = lmms_eval_specific_kwargs.get("post_prompt", "") | |
| return f"{pre_prompt}{question}{post_prompt}" | |