File size: 430 Bytes
127f2b0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os
import jsonlines

dir = '/home/weifengsun/tangou1/step2/step22/dataset'
subdirs = sorted([d for d in os.listdir(dir)])

for subdir in subdirs:
    json_path = os.path.join(dir, subdir, 'functions.jsonl')
    if os.path.exists(json_path):
        with jsonlines.open(json_path) as reader:
            for obj in reader:
                if 'score' not in obj:
                    print(subdir)
                    break