Files
life-echo/api/app/features/evaluation/gate_report_service.py

18 lines
537 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""门禁结果序列化(供 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,
}