mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-24 17:05:03 +00:00
extract answer from last answer tag
This commit is contained in:
parent
cc0312e446
commit
c196d622e0
5 changed files with 31 additions and 22 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue