Skip to content

Commit

Permalink
update import place
Browse files Browse the repository at this point in the history
  • Loading branch information
shijinPJ committed Sep 19, 2024
1 parent 38a0f8b commit ec2b73a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opencompass/datasets/dingo.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def load(path: str):

@ICL_EVALUATORS.register_module()
class DingoEvaluator(BaseEvaluator):
def __init__(self):

def score(self, origin_prompt: List, predictions: List) -> dict:
try:
from dingo.model.model import Model
from dingo.io import InputArgs
Expand All @@ -50,7 +51,6 @@ def __init__(self):
raise ModuleNotFoundError(
'=========== dingo register fail. please try: pip install dingo-python. ===========')

def score(self, origin_prompt: List, predictions: List) -> dict:
current_time = time.strftime('%Y%m%d_%H%M%S', time.localtime())
file_data = [{'prompt':pmt, 'prediction':prd} for pmt, prd in zip(origin_prompt, predictions)]
file_name = 'dingo_file_' + current_time + '.jsonl'
Expand Down

0 comments on commit ec2b73a

Please sign in to comment.