校准漂移检测增加日志告警 + 更新架构文档
- core.py:drift.drifted=true 时输出 loguru warning,包含 delta% 和 sample 数量 - data-architecture-review.md:标记 2 项误诊(METAR TTL 实际 600s、轮询已有 AbortController 保护) - 剩余真正待办:校准自动重训练(需算力)、缓存键细化(低优先级)
This commit is contained in:
@@ -508,6 +508,12 @@ def _probability_summary() -> Dict[str, Any]:
|
||||
records.append(rec)
|
||||
if records:
|
||||
drift = check_calibration_drift(records)
|
||||
if drift.get("drifted"):
|
||||
logger.warning(
|
||||
"Calibration drift detected: {} — {}",
|
||||
drift.get("warning") or "CRPS degraded",
|
||||
f"delta={drift.get('delta_pct')}% samples={drift.get('sample_count')}",
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user