mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-25 17:10:51 +00:00
Fix PoolMatrixConfigs::score_answer(), add unit tests (#215)
This commit is contained in:
parent
99fec3425d
commit
48f082663a
2 changed files with 27 additions and 2 deletions
|
|
@ -102,8 +102,8 @@ class PoolMatrixDataset(ProceduralDataset):
|
|||
|
||||
reward = 0.0
|
||||
try:
|
||||
oracle_answer = np.array(entry["answer"])
|
||||
answer = np.array(answer)
|
||||
oracle_answer = np.loadtxt(entry["answer"].splitlines(), dtype=np.float32)
|
||||
answer = np.loadtxt(answer.splitlines(), dtype=np.float32)
|
||||
if oracle_answer.shape == answer.shape and np.allclose(oracle_answer, answer):
|
||||
reward = 1.0
|
||||
elif oracle_answer.shape == answer.shape:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue