mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
3.3 KiB
3.3 KiB
Contributing to Reasoning Gym
Thank you for your interest in contributing to Reasoning Gym! This document provides guidelines and instructions for contributing to the project.
Development Setup
-
Clone the repository:
git clone https://github.com/open-thought/reasoning-gym.git -
Create a virtual environment (using conda):
conda create --name reasoning_gym python=3.11 -y conda activate reasoning_gym -
Install the package in editable mode:
pip install -e . -
Install development dependencies:
pip install -r requirements-dev.txt
Creating Procedural Datasets
When creating new datasets, please follow these guidelines:
-
Focus on Complex Problems:
- Prioritize problems where guessing has a low probability of success (e.g., number multiplication)
- Avoid tasks with small answer sets (true/false, multiple-choice) as they create noisy rewards for RL
-
Implementation Requirements:
- Create a configuration class
- Derive your dataset class from
ProceduralDataset(see dataset.py) - Include comprehensive unit tests
- Return dictionary items with keys:
"question","answer", and"metadata" - Use
Nonefor"answer"when multiple valid answers exist - For complex datasets, implement the
score_answer()method (return value range: [0, 1])
-
Getting Started:
- Review example implementations:
- Write clear question prompts that an average human can understand and answer correctly
Pull Request Process
-
Fork and Clone:
- Fork the repository
- Clone your fork locally
- Read more about forks
-
Create a Feature Branch:
- Work on a new branch
- Keep changes focused and minimal
-
Code Quality:
- Install pre-commit hooks:
pre-commit install - Run
pre-commit run -abefore committing - When using AI coding assistants (cursor, aider, etc.), ensure proper formatting
- Install pre-commit hooks:
-
Submit Your PR:
- Create a Pull Request
- Request review
- Do not include changes to
GALLERY.md(it's updated automatically)
-
Review Process:
- Address reviewer feedback promptly
- Keep discussions constructive
- Once approved, your changes will be merged into
main
Need Help?
Join our community discussion in the #reasoning-gym channel on the GPU-Mode Discord server.