Browse Source

Fixed some reporting in custom_tabulate.py

gaia_multiagent_v01_march_1st
Adam Fourney 2 years ago
parent
commit
8cfcc82d0f
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      samples/tools/autogenbench/scenarios/GAIA/Scripts/custom_tabulate.py

+ 5
- 1
samples/tools/autogenbench/scenarios/GAIA/Scripts/custom_tabulate.py View File

@@ -16,7 +16,11 @@ def normalize_answer(a):
# Trim (left and right)
# Replace multiple spaces with one space
# Remove trailing punctuation
return re.sub(r"[\.\!\?]+$", "", re.sub(r"\s+", " ", a.strip().lower()))
norm_answer = re.sub(r"\s+", " ", a.strip().lower())
if re.search(r"^[\.\!\?]+$", norm_answer):
return norm_answer
else:
return re.sub(r"[\.\!\?]+$", "", norm_answer)


def scorer(instance_dir):


Loading…
Cancel
Save