This commit is contained in:
gaotongxiao 2023-07-05 15:23:34 +08:00
parent dcf11cf8fd
commit 1ee80f14d2

View File

@ -1,3 +1,4 @@
import os.path as osp
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
@ -42,6 +43,8 @@ bbh_free_form_sets = [
bbh_datasets = []
for _name in bbh_multiple_choice_sets:
_hint = None
if osp.exists(f"{_path_prefix}/lib_prompt/{_name}.txt"):
_hint = open(f"{_path_prefix}/lib_prompt/{_name}.txt", 'r').read()
bbh_infer_cfg = dict(
prompt_template=dict(
@ -72,6 +75,8 @@ for _name in bbh_multiple_choice_sets:
eval_cfg=bbh_eval_cfg.copy()))
for _name in bbh_free_form_sets:
_hint = None
if osp.exists(f"{_path_prefix}/lib_prompt/{_name}.txt"):
_hint = open(f"{_path_prefix}/lib_prompt/{_name}.txt", 'r').read()
bbh_infer_cfg = dict(
prompt_template=dict(