File size: 394 Bytes
92ca5fa
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import json

input_file = "./log/Qwen2.5-VL-7B-Instruct/ours_20250926_165503.jsonl"
output_file = "tmp.jsonl"

# 读取前 10 条
with open(input_file, "r", encoding="utf-8") as fin:
    lines = [next(fin) for _ in range(10)]  # 取前10行

# 保存到新的 jsonl
with open(output_file, "w", encoding="utf-8") as fout:
    fout.writelines(lines)

print(f"已保存前10条到 {output_file}")