extract answer from last answer tag

This commit is contained in:
Andreas Koepf 2025-01-28 16:37:19 +00:00
parent cc0312e446
commit c196d622e0
5 changed files with 31 additions and 22 deletions

View file

@ -53,7 +53,7 @@ class ProceduralDataset(ABC, Sized, Iterable[Dict[str, Any]]):
def score_answer(self, answer: Optional[str], entry: Dict[str, any]) -> float:
"""Overwrite this method in derived classes if a single oracle answer is not available."""
oracle_answer = entry["answer"]
reward = 0
reward = 0.0
if answer is not None:
if answer == oracle_answer:
reward = 1.0