mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
updated algorithmics dataset (#269)
* updated algorithmic datasets * added changes to symbolic and power * updated power function test
This commit is contained in:
parent
f426db90ec
commit
d9638df79c
5 changed files with 57 additions and 29 deletions
|
|
@ -59,20 +59,6 @@ def test_power_function_score_function():
|
|||
config = PowerFunctionConfig(seed=42)
|
||||
dataset = PowerFunctionDataset(config)
|
||||
|
||||
item = dataset[0]
|
||||
|
||||
# Answer is within 1e-6 of solution
|
||||
answer = str(item["metadata"]["solution"] - 1e-7)
|
||||
assert dataset.score_answer(answer, item) == 1.0
|
||||
|
||||
# Answer is within 1e-1 of solution
|
||||
answer = str(item["metadata"]["solution"] - 1e-2)
|
||||
assert dataset.score_answer(answer, item) == 0.5
|
||||
|
||||
# Answer is far from solution
|
||||
answer = str(item["metadata"]["solution"] - 1)
|
||||
assert dataset.score_answer(answer, item) == 0.0
|
||||
|
||||
# Answer is None
|
||||
answer = None
|
||||
assert dataset.score_answer(answer, item) == 0.0
|
||||
for item in dataset:
|
||||
answer = item["answer"]
|
||||
assert dataset.score_answer(answer, item) == 1.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue