mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
Add a few new CodeI/O samples, resolve numeric answer scoring bug (#332)
* add handful of codeio samples * scoring fix
This commit is contained in:
parent
c3c6cc8051
commit
f14662e213
2 changed files with 1 additions and 1 deletions
|
|
@ -173,7 +173,7 @@ class CodeIODataset(ProceduralDataset):
|
|||
# TODO: Consider a more sophisticated distance metric for numeric values?
|
||||
abs1, abs2 = abs(float(value1)), abs(float(value2))
|
||||
divisor = max(min(abs1, abs2), 10e-5)
|
||||
value_dist += (abs1 - abs2) / divisor
|
||||
value_dist = max(len(value1), len(value2)) * abs((abs1 - abs2) / divisor)
|
||||
except ValueError:
|
||||
# Fall back on string edit distance
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue