(path_id, mode, model)
| 210 | return res |
| 211 | |
| 212 | def reflection(path_id, mode, model): |
| 213 | datas = [] |
| 214 | with open(path_id, 'r') as f: |
| 215 | for line in f: |
| 216 | datas.append(json.loads(line)) |
| 217 | results = [] |
| 218 | f = open(path_id + '.reflection_'+str(mode) + '_'+str(model), 'a') |
| 219 | datas = datas[38:] |
| 220 | for data in tqdm(datas): |
| 221 | if mode == 0: |
| 222 | results.append(reflection_basic(data, model)) |
| 223 | if mode == 1: |
| 224 | results.append(reflection_basicloser(data, model)) |
| 225 | # elif mode == 2: |
| 226 | # results.append(reflection_judge(data, model)) |
| 227 | # elif mode == 3: |
| 228 | # results.append(reflection_peerreview(data, model)) |
| 229 | # with open() as f: |
| 230 | # for result in results: |
| 231 | f.write(json.dumps(results[-1]) + '\n') |
| 232 | path_id = 'CompetitionArena/results/config_template_en_nojudge_10_6_all/results_template_en_nojudge_10_6_all.jsonl' |
| 233 | |
| 234 | for model in ROLES.keys(): |
no test coverage detected