[FIX] mmmu bench serving result display error (#6525) (#6791)

This commit is contained in:
Yikai Zhang
2025-06-01 04:48:06 +08:00
committed by GitHub
parent f90945c45a
commit fb507b7b10

View File

@@ -1212,7 +1212,7 @@ async def benchmark(
if "<image>" in test_prompt: if "<image>" in test_prompt:
import re import re
image_match = re.search(r"<image>(.*?)</image>(.*)", test_prompt) image_match = re.search(r"<image>(.*?)</image>(.*)", test_prompt, re.DOTALL)
image_data = image_match.group(1) if image_match else None image_data = image_match.group(1) if image_match else None
test_prompt = image_match.group(2) if image_match else test_prompt test_prompt = image_match.group(2) if image_match else test_prompt
else: else:
@@ -1285,7 +1285,7 @@ async def benchmark(
if "<image>" in prompt: if "<image>" in prompt:
import re import re
image_match = re.search(r"<image>(.*?)</image>(.*)", prompt) image_match = re.search(r"<image>(.*?)</image>(.*)", prompt, re.DOTALL)
image_data = image_match.group(1) if image_match else None image_data = image_match.group(1) if image_match else None
prompt = image_match.group(2) if image_match else prompt prompt = image_match.group(2) if image_match else prompt
else: else: