mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
add ArcAgiDataset class, fix score_entry() metadata params
This commit is contained in:
parent
2ad0965fdc
commit
4e49806d22
20 changed files with 194 additions and 93 deletions
|
|
@ -81,7 +81,7 @@ class PalindromeDataset(ProceduralDataset):
|
|||
"""Return the palindrome string from the letter set."""
|
||||
return "".join(letters)
|
||||
|
||||
def score_answer(self, answer: Optional[str], metadata: Dict[str, Any]) -> float:
|
||||
def score_answer(self, answer: Optional[str], entry: Dict[str, Any]) -> float:
|
||||
"""Determine if the solution provided is a valid palindrome.
|
||||
The answer is expected to be a single string
|
||||
|
||||
|
|
@ -98,6 +98,7 @@ class PalindromeDataset(ProceduralDataset):
|
|||
if answer == "":
|
||||
return 0.01
|
||||
|
||||
metadata = entry["metadata"]
|
||||
answer = answer.strip().lower()
|
||||
expected_letters = metadata["letters"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue