세션 평가와 교수자 분석 보강
This commit is contained in:
parent
5c4ac04e06
commit
fe2796f05a
51 changed files with 4928 additions and 240 deletions
|
|
@ -39,6 +39,13 @@ _APPROPRIATENESS_SCORE = {
|
|||
}
|
||||
|
||||
|
||||
def _coerce_error_message(error: BaseException | str) -> str:
|
||||
if isinstance(error, BaseException):
|
||||
message = str(error).strip()
|
||||
return message or error.__class__.__name__
|
||||
return str(error).strip() or "unknown session evaluation error"
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class CaseContext:
|
||||
case_id: str
|
||||
|
|
@ -114,7 +121,7 @@ class SessionEvaluationWrite:
|
|||
scope=scope,
|
||||
stage=stage,
|
||||
payload={},
|
||||
error=str(error),
|
||||
error=_coerce_error_message(error),
|
||||
)
|
||||
|
||||
def cache_record(self) -> dict[str, Any]:
|
||||
|
|
@ -1254,9 +1261,8 @@ async def load_session_evaluation(
|
|||
session_id,
|
||||
)
|
||||
if row is None:
|
||||
return (
|
||||
_EVALUATION_CACHE.get(session_id) if runtime_fallback_allowed() else None
|
||||
), False
|
||||
cached = _EVALUATION_CACHE.get(session_id) if runtime_fallback_allowed() else None
|
||||
return cached, cached is None
|
||||
return {
|
||||
"status": row["status"],
|
||||
"source": row["source"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue