Skip to content

Commit

Permalink
add for pip
Browse files Browse the repository at this point in the history
  • Loading branch information
shijinPJ committed Sep 19, 2024
1 parent 51efddd commit 0e5ce19
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions opencompass/configs/datasets/dingo/dingo_gen.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.datasets import DingoDataset, DingoEvaluator


dingo_paths = [
'./data/dingo/en_192.csv',
'./data/dingo/zh_170.csv',
]

dingo_datasets = []
for path in dingo_paths:
dingo_reader_cfg = dict(input_columns='input', output_column=None)
dingo_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[dict(role='HUMAN', prompt='{input}')])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
dingo_eval_cfg = dict(evaluator=dict(type=DingoEvaluator), pred_role='BOT')

dingo_datasets.append(
dict(
abbr='dingo_' + path.split('/')[-1].split('.csv')[0],
type=DingoDataset,
path=path,
reader_cfg=dingo_reader_cfg,
infer_cfg=dingo_infer_cfg,
eval_cfg=dingo_eval_cfg,
))

datasets = dingo_datasets

0 comments on commit 0e5ce19

Please sign in to comment.