feat(sense): T-G3 标签+校准(labeler 四规则推导 + split-conformal + last-good)

- labeler.py:derive_true_tier 纯函数(规则0 人工优先 / plan_multi->T3 /
  失败->下一档(T3保持) / 成功->executed / 空结果跳过)+ derive_true_tiers
  批量回填 + 180d 留存清理
- calibrate.py:compute_thresholds(τ1/τ3 分组扫描——并列分数整组判定,
  精度 >= 1-α 的最大覆盖阈值;<min_labels -> ok=False 沿用 last-good);
  save_thresholds 工件落盘+登记;load_active 回退链 active->同kind扫描->last-good->保守值
- store:all_observations/list_artifacts 支撑方法
- 测试 +9(四规则/批量清理/覆盖达标/标签不足/工件往返与回退),全量 395 passed
This commit is contained in:
tzt
2026-09-05 13:53:45 +08:00
parent 51f1de2154
commit 324c419c35
5 changed files with 321 additions and 1 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ P0 完成后的能力:干净的后端抽象 + 可量化的评测 + 可追溯
| T-G0 | 骨架:gateway/sense/ 包 + sense.sqlite3 DDL + enabled 门控 | ✅ 完成 | c3efa70 |
| T-G1 | Embedder/v1/embeddings 客户端 + int8 量化 + 降级阶梯 | ✅ 完成 | T-G1 |
| T-G2 | 观察埋点:observer + 三消费方埋点(pipeline/proxy/client | ✅ 完成 | T-G2 |
| T-G3 | 标签+校准:夜间 true_tier 推导 + split-conformal + 工件表 | ⬜ 待办 | |
| T-G3 | 标签+校准:夜间 true_tier 推导 + split-conformal + 工件表 | ✅ 完成 | T-G3 |
| T-G3b | KnnHead(架构变体 B):kNN 投票 + conformal-kNN + 按桶分区/封顶/压缩;hybrid fusion 预留(§14 | ⬜ 待办 | |
| T-G4 | 线性头:离线训练脚本 + LinearHead 纯 Python 推理 + 登记 | ⬜ 待办 | |
| T-G5 | Grader:决策组合(特征门×概率×conformal+ /v1/route + 三态 mode | ⬜ 待办 | |