add humaneval support

This commit is contained in:
liam 2025-03-04 20:54:49 +08:00
parent 216a63b858
commit dc10480ef6
7 changed files with 130 additions and 4 deletions

View file

@ -59,8 +59,8 @@ class DataEvaluator:
:param text: The raw prediction string.
:return: Processed prediction string.
"""
text = text.lstrip('\n').split('\n')[0]
return text[:1]
text = text.lstrip('\n').split('\n')[-1]
return text[-1:]
def score(self, pred, answers):
"""