mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
add None/empty check to score_answer of cryptarithm
This commit is contained in:
parent
6d5168d1e5
commit
65d17b9850
1 changed files with 3 additions and 0 deletions
|
|
@ -223,6 +223,9 @@ class CryptarithmDataset(ProceduralDataset):
|
|||
Returns:
|
||||
float: The computed score between 0.0 and 1.0.
|
||||
"""
|
||||
if not answer:
|
||||
return 0.0
|
||||
|
||||
correct_mapping = {}
|
||||
correct_answer_str = entry["answer"] # e.g. "A=1,B=7,..."
|
||||
for pair in correct_answer_str.split(","):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue