five

shuyuej/MetaMathQA

收藏
Hugging Face2024-01-25 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/shuyuej/MetaMathQA
下载链接
链接失效反馈
官方服务:
资源简介:
--- license: apache-2.0 --- # MetaMath Dataset with "{"question": question, "answer": answer}" pairs. # 💻 Dataset Usage Run the following command to load the data: ```python from datasets import load_dataset dataset = load_dataset("shuyuej/MetaMathQA") dataset = dataset['train'] print(dataset) ``` # 📝 Dataset modification codes ```python # coding=utf-8 import jsonlines from datasets import load_dataset # Load the dataset dataset = load_dataset("meta-math/MetaMathQA") dataset = dataset["train"] data = [] for example in dataset: question = example['query'] answer = example['response'] data.append({"question": question, "answer": answer}) # Save the modified data to a jsonl file output_file = 'MetaMathQA.jsonl' with jsonlines.open(output_file, 'w') as writer: writer.write_all(data) print(f"Modified data saved to {output_file}") ```
提供机构:
shuyuej
原始信息汇总

MetaMath Dataset with "{"question": question, "answer": answer}" pairs.

数据集使用

运行以下命令加载数据: python from datasets import load_dataset

dataset = load_dataset("shuyuej/MetaMathQA") dataset = dataset[train] print(dataset)

数据集修改代码

python

coding=utf-8

import jsonlines from datasets import load_dataset

加载数据集

dataset = load_dataset("meta-math/MetaMathQA") dataset = dataset["train"]

data = [] for example in dataset: question = example[query] answer = example[response]

data.append({"question": question, "answer": answer})

保存修改后的数据到jsonl文件

output_file = MetaMathQA.jsonl with jsonlines.open(output_file, w) as writer: writer.write_all(data)

print(f"Modified data saved to {output_file}")

5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作