File size: 669 Bytes
d8f108d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import json
import math
with open("/share/project/weihao/save_dir/checkpoints/sft_metamath_trn_5e_5_3epoch/ckpt18513_hf/syn_180k_data_4infer.json", "r") as r:
data_json = json.load(r)
before_list = data_json[:math.floor(0.5*len(data_json))]
after_list = data_json[math.floor(0.5*len(data_json)):]
with open("/share/project/weihao/save_dir/checkpoints/sft_metamath_trn_5e_5_3epoch/ckpt18513_hf/syn_180k_data_4infer_before.json", "w") as w:
json.dump(before_list, w)
with open("/share/project/weihao/save_dir/checkpoints/sft_metamath_trn_5e_5_3epoch/ckpt18513_hf/syn_180k_data_4infer_after.json", "w") as w:
json.dump(after_list, w)
print("bupt") |