reasoning-gym
raw JSON → 0.1.25 verified Sat May 09 auth: no python
A library of procedural dataset generators for training reasoning models. Current version 0.1.25, with frequent releases (multiple per month). Requires Python >=3.10.
pip install reasoning-gym Common errors
error AttributeError: module 'reasoning_gym' has no attribute 'games' ↓
cause Submodules are not automatically imported; you need an explicit import of the submodule.
fix
Run
import reasoning_gym.games.countdown or from reasoning_gym.games.countdown import countdown. error ModuleNotFoundError: No module named 'reasoning_gym' ↓
cause Library not installed or wrong environment.
fix
Ensure you have installed reasoning-gym via
pip install reasoning-gym and are using Python >=3.10. Warnings
gotcha Submodules like games, algebra, etc. are not imported at the top level. You must import from the full path (e.g., reasoning_gym.games.countdown). ↓
fix Use `from reasoning_gym.games.countdown import countdown` instead of `import reasoning_gym.games.countdown`.
deprecated Some older generator classes have been renamed or moved. Check the CHANGELOG if you get ImportError. ↓
fix Refer to the latest documentation or GitHub README for the correct import path.
Imports
- countdown wrong
from reasoning_gym import countdowncorrectfrom reasoning_gym.games.countdown import countdown
Quickstart
import reasoning_gym
from reasoning_gym.games.countdown import countdown
# Create a dataset generator
gen = countdown.CountdownGenerator()
# Generate n items
items = list(gen.generate(num_items=5))
for item in items:
print(item)