INNER CODE UNIT · Python

overall

cmu-sei/GHOSTS · experimental/grms/grms/main.py:163

    overall = sum(d.score for d in dimensions) / max(len(dimensions), 1)

    return PredictionScore(
        overall_score=overall,
        escalation_score=escalation_score,
        action_type_score=action_type_score,
        tone_score=tone_score,
        dimensions=dimensions,
    )


async def _persist_prediction(prediction: SavedPrediction) -> None:
    """Persist a prediction (with optional score) to SQLite."""
    data = {
        "id": str(prediction.id),
        "created_at": prediction.created_at.isoformat(),
        "historical_date": prediction.historical_date,
        "label": prediction.label,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…