-
Notifications
You must be signed in to change notification settings - Fork 51
Feature/jschen 20260702 aalcr and ifbench #395
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
Open
jschen069
wants to merge
27
commits into
AISBench:master
Choose a base branch
from
jschen069:feature/jschen_20260702_aalcr_and_ifbench
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
d1dde55
第一版添加IFbench代码和aa_lcr代码
18cc1f0
添加导入model
jschen69 10e0630
Merge branch 'AISBench:master' into master
jschen069 8ca40de
修改加载路径
jschen069 e6671f6
修改aa_lcr
jschen069 7f7f2e0
修改名称
jschen069 2556bdb
修改配置
jschen069 f605e24
修改aa_lcr逻辑
jschen069 93ad77b
修改加载路径
jschen069 e83282f
修改aa_lcr逻辑
jschen069 c2556c8
修改入参
jschen069 aca7667
添加aa_lcr日志
jschen069 39cb8f5
修改日志存储
jschen069 d147556
添加日志
jschen069 1d5ba4e
添加日志
jschen069 3974ee5
添加日志打印
jschen069 377d60f
添加测试用例
jschen069 d6a85b0
添加日志
jschen069 b67f113
Merge branch 'master' into feature/jschen_20260702_aalcr_and_ifbench
jschen069 2c60f85
添加运行时依赖
jschen069 52a6be5
修改review意见和流水线
jschen069 c1f4834
删除文档
jschen069 75e0ea0
修改流水线
jschen069 e42e671
添加用例
jschen069 be92cf3
添加锁
jschen069 c154d77
Merge branch 'feature/jschen_20260702_aalcr_and_ifbench' of github.co…
jschen069 15ff460
添加锁互斥
jschen069 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
102 changes: 102 additions & 0 deletions
102
ais_bench/benchmark/configs/datasets/aa_lcr/aa_lcr_llmjudge.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/', | ||
| 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, | ||
| ) | ||
| ] | ||
33 changes: 33 additions & 0 deletions
33
ais_bench/benchmark/configs/datasets/ifbench/ifbench_0_shot_gen_str.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, | ||
| ) | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 withais_bench/), similar to other datasets (e.g.,ifbench). Including the repository folder namebenchmarkas a prefix will cause file-not-found errors when running the benchmark from the repository root.