{"record":{"id":"2806d937a9b606d7","repo":"rohitg00/ai-engineering-from-scratch","slug":"no-shared-seeds-between-candidate-and-baseline","errorCode":null,"errorMessage":"no shared seeds between candidate and baseline","messagePattern":"no shared seeds between candidate and baseline","errorType":"exception","errorClass":"PairingError","httpStatus":null,"severity":"error","filePath":"phases/19-capstone-projects/53-result-evaluator/code/main.py","lineNumber":197,"sourceCode":"        seed = r.metrics.get(\"seed\")\n        if seed is None:\n            raise PairingError(f\"candidate {r.spec_id} missing seed\")\n        seed_i = int(seed)\n        if seed_i in cand_map:\n            raise PairingError(f\"duplicate candidate seed {seed_i} (spec {r.spec_id})\")\n        cand_map[seed_i] = float(r.metrics[metric])\n    base_map: dict[int, float] = {}\n    for r in baselines:\n        seed = r.metrics.get(\"seed\")\n        if seed is None:\n            raise PairingError(f\"baseline {r.spec_id} missing seed\")\n        seed_i = int(seed)\n        if seed_i in base_map:\n            raise PairingError(f\"duplicate baseline seed {seed_i} (spec {r.spec_id})\")\n        base_map[seed_i] = float(r.metrics[metric])\n    shared = sorted(set(cand_map.keys()) & set(base_map.keys()))\n    if not shared:\n        raise PairingError(\"no shared seeds between candidate and baseline\")\n    return [cand_map[s] for s in shared], [base_map[s] for s in shared]\n\n\ndef _improvement(candidate_mean: float, baseline_mean: float, direction: str) -> float:\n    denom = abs(baseline_mean) if baseline_mean != 0.0 else 1.0\n    raw = (candidate_mean - baseline_mean) / denom\n    if direction == LOWER:\n        return -raw\n    return raw\n\n\ndef _log_transform(values: list[float], scale: str) -> list[float]:\n    if scale != LOG:\n        return list(values)\n    out = []\n    for v in values:\n        if v <= 0.0:\n            raise ValueError(f\"log scale metric must be positive, got {v}\")","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/rohitg00/ai-engineering-from-scratch/blob/39ea8a1c6d0b61f071226eff7ede4d4105fed820/phases/19-capstone-projects/53-result-evaluator/code/main.py#L179-L215","documentation":"Error \"no shared seeds between candidate and baseline\" thrown in rohitg00/ai-engineering-from-scratch.","triggerScenarios":"Thrown at phases/19-capstone-projects/53-result-evaluator/code/main.py:197 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"39ea8a1c6d0b61f071226eff7ede4d4105fed820","analyzedAt":"2026-08-26T03:13:46.626Z","schemaVersion":2},"datasetVersion":"2026-08-26T07:17:17.940Z"}