IDoNotHaveAName commited on
Commit
22697af
·
verified ·
1 Parent(s): 380db57

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. contrary_data.jsonl +0 -0
  2. ori_prob_to_prob.py +14 -0
contrary_data.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
ori_prob_to_prob.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from datasets import load_dataset
2
+ import json
3
+
4
+ # 加载数据集
5
+ dataset = load_dataset("IDoNotHaveAName/epoch-2-mistake-collection")
6
+
7
+ old_data=dataset["train"]
8
+ with open("./contrary_data.jsonl", "a", encoding="utf-8") as f:
9
+ for example in old_data:
10
+ new_data={
11
+ "problem": example["problem_original"],
12
+ "solution": example["solution"]
13
+ }
14
+ f.write(json.dumps(new_data, ensure_ascii=False) + "\n")