From fc600258b2624b4d179e56ac4ab7bb6f8ed85cff Mon Sep 17 00:00:00 2001 From: wenba0 <3054239545@qq.com> Date: Tue, 23 Jun 2026 15:15:46 +0800 Subject: [PATCH 1/2] test ai --- .codex | 0 ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen.py | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .codex diff --git a/.codex b/.codex new file mode 100644 index 00000000..e69de29b diff --git a/ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen.py b/ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen.py index 41d7dd63..d2b57dee 100644 --- a/ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen.py +++ b/ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen.py @@ -3,7 +3,7 @@ from ais_bench.benchmark.openicl.icl_inferencer import GenInferencer from ais_bench.benchmark.datasets import TEXTVQADataset, TEXTEvaluator, TEXTEvaluatorForVita - +PROMPT = "Answer the question using a single word or phrase." textvqa_reader_cfg = dict( input_columns=['question', 'image'], output_column='answer' @@ -16,7 +16,7 @@ template=dict( round=[ dict(role="HUMAN", prompt_mm={ - "text": {"type": "text", "text": "{question} Answer the question using a single word or phrase."}, + "text": {"type": "text", "text": "{question} "+PROMPT}, "image": {"type": "image_url", "image_url": {"url": "file://{image}"}}, }) ] From 19c676f6c2f9b772b94da20afe4db99fd55b29be Mon Sep 17 00:00:00 2001 From: wenba0 <3054239545@qq.com> Date: Tue, 23 Jun 2026 16:06:26 +0800 Subject: [PATCH 2/2] fix review --- ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen.py | 2 +- .../benchmark/configs/datasets/textvqa/textvqa_gen_base64.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen.py b/ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen.py index d2b57dee..1d6d4b5e 100644 --- a/ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen.py +++ b/ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen.py @@ -16,7 +16,7 @@ template=dict( round=[ dict(role="HUMAN", prompt_mm={ - "text": {"type": "text", "text": "{question} "+PROMPT}, + "text": {"type": "text", "text": f"{{question}} {PROMPT}"}, "image": {"type": "image_url", "image_url": {"url": "file://{image}"}}, }) ] diff --git a/ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen_base64.py b/ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen_base64.py index 1e567370..6ed3a76c 100644 --- a/ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen_base64.py +++ b/ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen_base64.py @@ -3,6 +3,7 @@ from ais_bench.benchmark.openicl.icl_inferencer import GenInferencer from ais_bench.benchmark.datasets import TEXTVQADataset, TEXTEvaluator +PROMPT = "Answer the question using a single word or phrase." textvqa_reader_cfg = dict( input_columns=['question', 'image'], @@ -16,7 +17,7 @@ template=dict( round=[ dict(role="HUMAN", prompt_mm={ - "text": {"type": "text", "text": "{question} Answer the question using a single word or phrase."}, + "text": {"type": "text", "text": f"{{question}} {PROMPT}"}, "image": {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,{image}"}}, }) ]