INNER CODE UNIT · Python

profile

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

            profile = PopulationProfile(**data)
            populations[_pop_key(profile.country, profile.period)] = profile
            logger.info("Seeded population: %s (%s)", profile.country, profile.period)
        except Exception as e:
            logger.warning("Failed to load %s: %s", filepath.name, e)
    logger.info("Seeded %d populations on startup", len(populations))


def _seed_scoring_cases():
    """Load scoring cases from seed data on startup."""
    seed_dir = Path(__file__).parent / "data" / "scoring"
    if not seed_dir.exists():
        return
    for filepath in sorted(seed_dir.glob("*.json")):
        try:
            data = json.loads(filepath.read_text())
            for item in data:
                case = ScoringCase(**item)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…