Document audit policy and add full kept export

This commit is contained in:
Codex
2026-06-24 22:43:04 +08:00
parent f06e573b04
commit 28b839eff0
4 changed files with 454 additions and 4 deletions

View File

@@ -113,13 +113,41 @@ python scripts/filtering/audit_native_traces.py \
python scripts/repurposing/coarse_decompose.py
```
构建 5k ModelScope-SWIFT training probe
### 模式 A全量 hard-filter-kept 训练数据
该模式会扫描 Open-SWE-Traces 四个 split 的全部样本,使用
`scripts/filtering/audit_native_traces.py` 中同一套 hard filter 规则,导出所有未触发
hard filter 的样本。按当前数据和规则,预期规模约为 190k 条。
全量导出使用流式 JSONL 写入,避免把约 190k 条长 trajectory 全部放进内存:
```bash
python scripts/repurposing/build_swift_full_kept.py \
--input-root data/Open-SWE-Traces \
--output-dir runs/training_full_kept_swift
```
如果需要同时写 gzip
```bash
python scripts/repurposing/build_swift_full_kept.py \
--input-root data/Open-SWE-Traces \
--output-dir runs/training_full_kept_swift \
--write-gzip
```
### 模式 B5k+500 probe/测试数据
该模式只用于快速训练链路和数据质量 probing不代表全量训练集。
构建 5k ModelScope-SWIFT training probe每个 source config 取 1,250 条 hard-filter-kept 样本:
```bash
python scripts/repurposing/build_swift_training_probe_5k.py
```
构建 500 条 validation split
构建 500 条 validation split,每个 source config 额外随机取 125 条,并排除 5k train 中的
`trajectory_id`
```bash
python scripts/repurposing/build_swift_validation_500.py
@@ -144,4 +172,3 @@ python scripts/repurposing/convert_openswe_to_pi_mono.py \
## 输出产物
`runs/``data/` 默认不进 git。推荐把所有大文件、parquet、jsonl、token 统计、audit report 都留在这两个目录下。