refactor: slim code/ to pure code; consolidate experiments/ and docs

- Remove code/experiments/ → merge all eval JSONs into root experiments/
- Move code/exp.md, code/change.md → project root
- Delete code/2026-05-09-研究框架.md (duplicate of docs/)
- Update .gitignore: experiments/*.log (was code/experiments/*.log)
- Update code/CLAUDE.md: fix all affected paths

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-15 08:31:17 +08:00
parent 555a8064d7
commit d557c6b0c6
14 changed files with 3948 additions and 42 deletions

View File

@@ -13,7 +13,7 @@
| Module C — RL 干预策略PPO | ✅ 完成 | safety_recall=1.0, over_refusal=0.004 |
| 论文写作 | 🔄 进行中 | — |
详细结果见项目根目录 `../state.md`,踩坑经验见 `exp.md`,变更记录见 `change.md`
详细结果见项目根目录 `../state.md`,踩坑经验见 `../exp.md`,变更记录见 `../change.md`
---
@@ -28,14 +28,15 @@ D:\Myresearch\CompanionGuard-RL\
│ ├── checkpoints/ ← 模型权重gitignored
│ │ ├── detector/best.pt ← Module B 论文权重1.35GB
│ │ └── intervention/final_v2.pt ← Module C 论文权重
│ ├── experiments/ ← 评估结果 JSON
│ │ ├── eval_intervention_v3.json ← Module C 论文用
│ │ └── eval_intervention_v4.json ← v3 重跑确认(数字相同)
│ └── data/ ← 处理后数据gitignored
├── data/ ← 原始数据集gitignored
├── docs/ ← 研究文档
├── state.md ← 项目进度快照(最新)
└── experiments/ ← 根目录评估结果备份
├── experiments/ ← 所有评估结果 JSON + 训练日志
│ ├── eval_intervention_v3.json ← Module C 论文用
│ └── eval_intervention_v4.json ← v3 重跑确认(数字相同)
├── exp.md ← 踩坑经验库
├── change.md ← 变更记录
└── state.md ← 项目进度快照(最新)
```
---
@@ -108,7 +109,7 @@ python scripts/evaluate.py \
--config configs/detector_config_server.yaml \
--test-data data/processed/CompanionRisk-Bench/test.jsonl \
--source-filter all \
--output experiments/eval_all.json
--output ../experiments/eval_all.json
# 重新评估干预策略Module C
python scripts/evaluate.py \
@@ -117,7 +118,7 @@ python scripts/evaluate.py \
--test-data data/processed/CompanionRisk-Bench/test.jsonl \
--config configs/detector_config_server.yaml \
--intervention-config configs/intervention_config.yaml \
--output experiments/eval_intervention_v3.json
--output ../experiments/eval_intervention_v3.json
```
---