File size: 352 Bytes
9b148bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import json

def create_instruction(sample):
    return {
        "prompt": sample[0],
        "completion": sample[1]
    }

# load dataset
with open("../evaluation_kit/dataset/set_v1.0.json") as f:
    dataset = json.load(f)

dataset = list(map(create_instruction, dataset))

with open("finetuning_set_v1.0.json", "w") as f:
    json.dump(dataset, f)