DouDou commited on
Upload data2/step22/find_none_score_func.py with huggingface_hub
Browse files
data2/step22/find_none_score_func.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import jsonlines
|
| 3 |
+
|
| 4 |
+
dir = '/home/weifengsun/tangou1/step2/step22/dataset'
|
| 5 |
+
subdirs = sorted([d for d in os.listdir(dir)])
|
| 6 |
+
|
| 7 |
+
for subdir in subdirs:
|
| 8 |
+
json_path = os.path.join(dir, subdir, 'functions.jsonl')
|
| 9 |
+
if os.path.exists(json_path):
|
| 10 |
+
with jsonlines.open(json_path) as reader:
|
| 11 |
+
for obj in reader:
|
| 12 |
+
if 'score' not in obj:
|
| 13 |
+
print(subdir)
|
| 14 |
+
break
|
| 15 |
+
|
| 16 |
+
|