File size: 754 Bytes
81a6cd3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b171b5b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
dataset_info:
  features:
  - name: type
    dtype: string
  - name: question
    dtype: string
  - name: answer
    dtype: string
  splits:
  - name: train
    num_bytes: 1890281
    num_examples: 7473
  download_size: 1068227
  dataset_size: 1890281
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
---

To reproduce
```python
from datasets import load_dataset, Dataset
from tqdm import tqdm

ds = load_dataset("allenai/RLVR-GSM")

out = []
for item in tqdm(ds["train"]):
    text =  item['messages'][0]['content']
    text = text.split("\n\nQuestion:")[-1].strip()
    out.append({
        "type": "math",
        "question": text,
        'answer': item['ground_truth']
    })

ds = Dataset.from_list(out)
```