Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
102 changes: 102 additions & 0 deletions ais_bench/benchmark/configs/datasets/aa_lcr/aa_lcr_llmjudge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
from ais_bench.benchmark.datasets.aa_lcr import (
AALCRDataset,
AALCRJGDataset,
AALCRJudgeEvaluator,
JUDGE_PROMPT,
)
from ais_bench.benchmark.models import VLLMCustomAPIChat
from ais_bench.benchmark.openicl.icl_inferencer import GenInferencer
from ais_bench.benchmark.openicl.icl_prompt_template import PromptTemplate
from ais_bench.benchmark.openicl.icl_retriever import ZeroRetriever

# ---------------------------------------------------------------------------
# Model inference configuration
# ---------------------------------------------------------------------------
# The prompt is fully built by AALCRDataset.load() – the template simply
# passes through the pre-formatted ``input`` field.
# ---------------------------------------------------------------------------

aa_lcr_reader_cfg = dict(
input_columns=['input'],
output_column='answers',
)

aa_lcr_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template='{input}',
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)

# ---------------------------------------------------------------------------
# Judge model configuration (LLM Judge – mirrors HLE pattern)
# ---------------------------------------------------------------------------

aa_lcr_judge_infer_cfg = dict(
judge_reader_cfg=dict(
input_columns=['question', 'answers', 'model_answer'],
output_column='model_pred_uuid',
),
judge_model=dict(
attr='service',
type=VLLMCustomAPIChat,
abbr='judge',
path='',
model='',
stream=False,
request_rate=0,
use_timestamp=False,
retry=2,
api_key='',
host_ip='localhost',
host_port=8005,
url='',
max_out_len=512,
batch_size=100,
trust_remote_code=False,
generation_kwargs=dict(
temperature=0.01,
seed=0,
chat_template_kwargs=dict(
enable_thinking=False,
),
),
),
judge_dataset_type=AALCRJGDataset,
prompt_template=dict(
type=PromptTemplate,
template=dict(
round=[
dict(role='HUMAN', prompt=JUDGE_PROMPT),
],
),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)

# ---------------------------------------------------------------------------
# Evaluation configuration
# ---------------------------------------------------------------------------

aa_lcr_eval_cfg = dict(
evaluator=dict(type=AALCRJudgeEvaluator),
)

# ---------------------------------------------------------------------------
# Dataset definitions
# ---------------------------------------------------------------------------

aa_lcr_datasets = [
dict(
abbr='aa_lcr',
type=AALCRDataset,
path='benchmark/ais_bench/datasets/aa_lcr/',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The dataset path is configured as 'benchmark/ais_bench/datasets/aa_lcr/'. However, relative paths in the benchmark configuration should be relative to the repository root (starting with ais_bench/), similar to other datasets (e.g., ifbench). Including the repository folder name benchmark as a prefix will cause file-not-found errors when running the benchmark from the repository root.

Suggested change
path='benchmark/ais_bench/datasets/aa_lcr/',
path='ais_bench/datasets/aa_lcr/',

reader_cfg=aa_lcr_reader_cfg,
infer_cfg=aa_lcr_infer_cfg,
judge_infer_cfg=aa_lcr_judge_infer_cfg,
eval_cfg=aa_lcr_eval_cfg,
)
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from ais_bench.benchmark.openicl.icl_prompt_template import PromptTemplate
from ais_bench.benchmark.openicl.icl_retriever import ZeroRetriever
from ais_bench.benchmark.openicl.icl_inferencer import GenInferencer
from ais_bench.benchmark.datasets.ifbench import IFBenchDataset, IFBenchEvaluator

ifbench_reader_cfg = dict(
input_columns=['prompt'],
output_column='reference',
)

ifbench_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template='{prompt}',
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)

ifbench_eval_cfg = dict(
evaluator=dict(type=IFBenchEvaluator),
)

ifbench_datasets = [
dict(
abbr='ifbench',
type=IFBenchDataset,
path='ais_bench/datasets/ifbench/data/train-00000-of-00001.parquet',
reader_cfg=ifbench_reader_cfg,
infer_cfg=ifbench_infer_cfg,
eval_cfg=ifbench_eval_cfg,
)
]
2 changes: 2 additions & 0 deletions ais_bench/benchmark/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
from ais_bench.benchmark.datasets.swebench_pro import * # noqa: F401, F403
from ais_bench.benchmark.datasets.refcoco import * # noqa: F401, F403
from ais_bench.benchmark.datasets.hle import * # noqa: F401, F403
from ais_bench.benchmark.datasets.aa_lcr import * # noqa: F401, F403
from ais_bench.benchmark.datasets.realworldqa import * # noqa: F401, F403
from ais_bench.benchmark.datasets.ifbench import * # noqa: F401, F403
from ais_bench.benchmark.datasets.oneig import * # noqa: F401, F403

Loading
Loading