|
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") |