To reproduce
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)