Skip to content

Commit 1c9ed2e

Browse files
authored
better usage demo in readme (#477)
* better usage demo in readme * example of non-default configs
1 parent 876e0aa commit 1c9ed2e

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,9 @@ pip install reasoning-gym
3838

3939
_Note that this project is currently under active development, and the version published on PyPI may be a few days behind `main`._
4040

41-
## 🛠️ Development
41+
## ✨ Quickstart
4242

43-
For development setup, see [CONTRIBUTING.md](CONTRIBUTING.md#development-setup).
44-
45-
## ✨ Example Usage
43+
Starting to generate tasks using Reasoning Gym is straightforward:
4644

4745
```python
4846
import reasoning_gym
@@ -65,6 +63,26 @@ metadata: {'animals': {'sheep': 2, 'dog': 2}, 'total_legs': 16}
6563
...
6664
```
6765

66+
Use keyword arguments to pass task-specific configuration values:
67+
68+
```python
69+
reasoning_gym.create_dataset('leg_counting', size=10, seed=42, max_animals=20)
70+
```
71+
72+
Create a composite dataset containing multiple task types, with optional relative task weightings:
73+
74+
```python
75+
from reasoning_gym.composite import DatasetSpec
76+
specs = [
77+
# here, leg_counting tasks will make up two thirds of tasks
78+
DatasetSpec(name='leg_counting', weight=2, config={}), # default config
79+
DatasetSpec(name='figlet_font', weight=1, config={"min_word_len": 4, "max_word_len": 6}), # specify config
80+
]
81+
reasoning_gym.create_dataset('composite', size=10, seed=42, datasets=specs)
82+
```
83+
84+
For the simplest way to get started training models with Reasoning Gym, we recommend using the `verifiers` library, which directly supports RG tasks. See `examples/verifiers` for details. However, RG data can be used with any major RL training framework.
85+
6886
## 🔍 Evaluation
6987

7088
Instructions for running the evaluation scripts are provided in [eval/README.md](https://github.com/open-thought/reasoning-gym/blob/main/eval/README.md).

0 commit comments

Comments
 (0)