INNER CODE UNIT · Python

_run_seeded_predictions

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

async def _run_seeded_predictions():
    """Run predictions for all seeded scoring cases, score them, and persist."""
    for case in scoring_cases.values():
        stable_id = uuid5(NAMESPACE_URL, f"grms:prediction:{case.id}")
        existing = await scoring_db.get_prediction(str(stable_id))
        if existing:
            continue
        try:
            response = await leader_service.predict(case.leader, case.event)
            prediction = SavedPrediction(
                id=stable_id,
                label=case.label,
                historical_date=case.historical_date,
                prediction_type="leader",
                event=case.event,
                leader_id=case.leader.id,
                leader_name=case.leader.name,
                country=case.leader.country,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…