mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
Data collisions notebooks and data (#406)
* Add collisions data * Fix logic issues in basic_arithmetic and gsm_symbolic data
This commit is contained in:
parent
43c739cb3e
commit
5b653b346c
4 changed files with 509 additions and 3 deletions
|
|
@ -161,10 +161,12 @@ class BasicArithmeticDataset(ProceduralDataset):
|
|||
right_parts.append(")")
|
||||
|
||||
else:
|
||||
divisor = rng.choice(find_common_divisors(dividend, 0))
|
||||
if dividend != 0:
|
||||
divisor = rng.choice(find_common_divisors(dividend, 0))
|
||||
else:
|
||||
divisor = rng.randint(1, 10**num_digits - 1)
|
||||
left_parts.append(str(divisor))
|
||||
left_parts.append("+")
|
||||
|
||||
left_parts.extend(right_parts)
|
||||
else:
|
||||
if dividend != 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue