From 381c1ad5a0074cab8edb27f4d70265ab44f2c98a Mon Sep 17 00:00:00 2001 From: gaotongxiao Date: Wed, 5 Jul 2023 15:26:15 +0800 Subject: [PATCH] fix bbh --- configs/datasets/bbh/bbh_gen_58abc3.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/datasets/bbh/bbh_gen_58abc3.py b/configs/datasets/bbh/bbh_gen_58abc3.py index bbd754e2..6489e5c4 100644 --- a/configs/datasets/bbh/bbh_gen_58abc3.py +++ b/configs/datasets/bbh/bbh_gen_58abc3.py @@ -1,4 +1,4 @@ -import os.path as osp +from os.path import exists from opencompass.openicl.icl_prompt_template import PromptTemplate from opencompass.openicl.icl_retriever import ZeroRetriever from opencompass.openicl.icl_inferencer import GenInferencer @@ -44,7 +44,7 @@ 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"): + if 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( @@ -76,7 +76,7 @@ for _name in bbh_multiple_choice_sets: for _name in bbh_free_form_sets: _hint = None - if osp.exists(f"{_path_prefix}/lib_prompt/{_name}.txt"): + if 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(