File size: 400 Bytes
09cc01a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import glob
import os
import json
import tqdm


for file in tqdm.tqdm(glob.glob("results/*/*.json")):
    print(file)
    if "Instruction" not in file:
        continue
    with open(file, "r") as fin:
        data = json.load(fin)
        if "individual" in data["test"]:
            del data["test"]["individual"]
        
    with open(file, "w") as fout:
        json.dump(data, fout, indent=2)