mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-25 19:32:02 +00:00
业务本体与标准实体:跨源键值对齐、对账共变算子、健康证据链与实体助手
- 新增标准业务实体(CanonicalEntity)模型、确定性跨源编码翻译、后台候选实体扫描与文档驱动实体智能助手 - 新增指标本体图谱(factor / reconciles_with / upstream_driver)、DAG 防环校验以及 ontology_neighbors / source_health 内置工具 - 新增跨源对账(analysis_reconcile)与滞后共变(analysis_cochange)分析算子,打通 [[h:H1]] 数据源健康证据链、报告导出与本体消融评测 - 数据目录新增「标准业务实体」视图与候选审阅工作台,口径页集成指标本体拓扑面板与端到端浏览器检查
This commit is contained in:
@@ -58,7 +58,7 @@ def _op_mode(request: Mapping[str, Any]) -> tuple[str, str | None]:
|
||||
|
||||
|
||||
def _compute(op: str, mode: str | None, raw: Mapping[str, Any], env: Any) -> AnalysisResult:
|
||||
from app.analysis import comparable, decompose, differ, series
|
||||
from app.analysis import cochange, comparable, decompose, differ, reconcile_op, series
|
||||
|
||||
if op == "decompose":
|
||||
modes = {"additive": decompose.additive, "ratio": decompose.ratio, "factor": decompose.factor}
|
||||
@@ -69,6 +69,10 @@ def _compute(op: str, mode: str | None, raw: Mapping[str, Any], env: Any) -> Ana
|
||||
return series.trend(raw, env)
|
||||
if op == "differ":
|
||||
return differ.differ(raw, env)
|
||||
if op == "reconcile":
|
||||
return reconcile_op.reconcile(raw, env)
|
||||
if op == "cochange":
|
||||
return cochange.cochange(raw, env)
|
||||
return comparable.comparable(raw, env)
|
||||
|
||||
|
||||
@@ -83,7 +87,7 @@ def _env(op: str, mode: str | None, settings: Mapping[str, Any], inputs: Any, fa
|
||||
def _data_refusal(op: str, mode: str | None, raw: Mapping[str, Any], env: Any, error: CallError) -> AnalysisResult:
|
||||
"""随数据变化的调用错误记成的算不了的结论。params 记调用原样(label 照样消毒;调用还没走完、规范化不完整,复算拿它重走一遍
|
||||
走到同一处),取过的快照都记进输入(Inputs.settle),阈值和判定标准同这个算子自己算不了时那一份。"""
|
||||
from app.analysis import decompose, differ, series
|
||||
from app.analysis import cochange, decompose, differ, reconcile_op, series
|
||||
from app.analysis import phrases as ph
|
||||
from app.analysis.common import build
|
||||
|
||||
@@ -97,6 +101,10 @@ def _data_refusal(op: str, mode: str | None, raw: Mapping[str, Any], env: Any, e
|
||||
used, criterion = series.refusal_basis(op, env.settings)
|
||||
elif op == "differ":
|
||||
used, criterion = differ.refusal_basis(mode, env.settings)
|
||||
elif op == "reconcile":
|
||||
used, criterion = reconcile_op.refusal_basis(env.settings)
|
||||
elif op == "cochange":
|
||||
used, criterion = cochange.refusal_basis(env.settings)
|
||||
else:
|
||||
used, criterion = [], ph.CRITERION_COMPARABLE
|
||||
code = "parent_refused" if error.code == "parent_refused" else "input_unavailable"
|
||||
|
||||
Reference in New Issue
Block a user