2026-08-05 01:59:42 +08:00
|
|
|
|
# -*- coding: utf-8 -*-
|
2026-08-05 08:21:41 +08:00
|
|
|
|
"""iAOP-Template-Ti 一期 · 炉层杂质预警包(Issue #70 特征工程 + #71 无监督模型 + #72 告警规则)。
|
2026-08-05 01:59:42 +08:00
|
|
|
|
|
2026-08-05 08:21:41 +08:00
|
|
|
|
导出三部分,覆盖 PRD 5.3 ③ 场景 A 全链路(采集 → 特征 → 评分 → 规则分级 →
|
|
|
|
|
|
驾驶舱红色告警 → LLM 解释):
|
|
|
|
|
|
|
|
|
|
|
|
- 特征工程引擎(FeatureSpec/FeatureEngine,#70);
|
|
|
|
|
|
- 无监督异常评分器与预警决策(ZScoreScorer/ImpurityForecaster,#71);
|
|
|
|
|
|
- 声明式三级告警规则引擎(AlertRuleEngine,#72)。
|
|
|
|
|
|
|
|
|
|
|
|
换行业只改模板配置,引擎与模型零改动(PRD 5.3)。
|
2026-08-05 01:59:42 +08:00
|
|
|
|
"""
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
|
|
|
|
from .features import (
|
|
|
|
|
|
FeatureKind,
|
|
|
|
|
|
FeatureSpec,
|
|
|
|
|
|
FeatureSpecError,
|
|
|
|
|
|
FeatureValue,
|
|
|
|
|
|
FeatureVector,
|
|
|
|
|
|
FeatureEngine,
|
|
|
|
|
|
FeatureTemplateConfig,
|
|
|
|
|
|
load_feature_config,
|
|
|
|
|
|
)
|
2026-08-05 08:21:41 +08:00
|
|
|
|
from .model import (
|
|
|
|
|
|
AlertDecision,
|
|
|
|
|
|
FeatureVectorLike,
|
|
|
|
|
|
ImpurityForecaster,
|
|
|
|
|
|
LeadTimeResult,
|
|
|
|
|
|
ThresholdRule,
|
|
|
|
|
|
ZScoreScorer,
|
|
|
|
|
|
evaluate_lead_time,
|
|
|
|
|
|
)
|
|
|
|
|
|
from .alert_rules import (
|
|
|
|
|
|
Alert,
|
|
|
|
|
|
AlertCondition,
|
|
|
|
|
|
AlertRule,
|
|
|
|
|
|
AlertRuleEngine,
|
|
|
|
|
|
AlertRulesTemplateConfig,
|
|
|
|
|
|
AlertSeverity,
|
|
|
|
|
|
load_alert_rules_config,
|
|
|
|
|
|
)
|
2026-08-05 01:59:42 +08:00
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
2026-08-05 08:21:41 +08:00
|
|
|
|
# 特征工程(#70)
|
2026-08-05 01:59:42 +08:00
|
|
|
|
"FeatureKind",
|
|
|
|
|
|
"FeatureSpec",
|
|
|
|
|
|
"FeatureSpecError",
|
|
|
|
|
|
"FeatureValue",
|
|
|
|
|
|
"FeatureVector",
|
|
|
|
|
|
"FeatureEngine",
|
|
|
|
|
|
"FeatureTemplateConfig",
|
|
|
|
|
|
"load_feature_config",
|
2026-08-05 08:21:41 +08:00
|
|
|
|
# 无监督模型(#71)
|
|
|
|
|
|
"AlertDecision",
|
|
|
|
|
|
"FeatureVectorLike",
|
|
|
|
|
|
"ImpurityForecaster",
|
|
|
|
|
|
"LeadTimeResult",
|
|
|
|
|
|
"ThresholdRule",
|
|
|
|
|
|
"ZScoreScorer",
|
|
|
|
|
|
"evaluate_lead_time",
|
|
|
|
|
|
# 告警规则(#72)
|
|
|
|
|
|
"Alert",
|
|
|
|
|
|
"AlertCondition",
|
|
|
|
|
|
"AlertRule",
|
|
|
|
|
|
"AlertRuleEngine",
|
|
|
|
|
|
"AlertRulesTemplateConfig",
|
|
|
|
|
|
"AlertSeverity",
|
|
|
|
|
|
"load_alert_rules_config",
|
2026-08-05 01:59:42 +08:00
|
|
|
|
]
|