feat/ 导出开发容器内的数据用于评估
This commit is contained in:
17
api/app/features/evaluation/gate_report_service.py
Normal file
17
api/app/features/evaluation/gate_report_service.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""门禁结果序列化(供 HTTP / UI)。"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from app.features.evaluation.gating_service import GateResult
|
||||
|
||||
|
||||
def gate_result_to_details(result: GateResult) -> dict[str, Any]:
|
||||
return {
|
||||
"mean_baseline_composite": result.mean_baseline_composite,
|
||||
"mean_candidate_composite": result.mean_candidate_composite,
|
||||
"mean_delta": result.mean_delta,
|
||||
"per_case": result.per_case,
|
||||
"protected_regressions": result.protected_regressions,
|
||||
}
|
||||
Reference in New Issue
Block a user