46 lines
1.1 KiB
Python
46 lines
1.1 KiB
Python
"""Combination and scoring dataclasses."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass, field
|
|
from typing import TYPE_CHECKING
|
|
|
|
if TYPE_CHECKING:
|
|
from physcom.models.entity import Entity
|
|
|
|
|
|
@dataclass
|
|
class Score:
|
|
"""A single metric score for a combination in a domain."""
|
|
|
|
metric_name: str
|
|
raw_value: float
|
|
normalized_score: float
|
|
estimation_method: str = "physics_calc"
|
|
confidence: float = 1.0
|
|
|
|
|
|
@dataclass
|
|
class ScoredResult:
|
|
"""Final composite result for a combination in a domain."""
|
|
|
|
combination_id: int | None
|
|
domain_name: str
|
|
scores: list[Score] = field(default_factory=list)
|
|
composite_score: float = 0.0
|
|
novelty_flag: str | None = None
|
|
llm_review: str | None = None
|
|
human_notes: str | None = None
|
|
pass_reached: int = 0
|
|
|
|
|
|
@dataclass
|
|
class Combination:
|
|
"""A generated combination of entities (one per dimension)."""
|
|
|
|
entities: list[Entity] = field(default_factory=list)
|
|
status: str = "pending" # pending → valid/p1_fail/p2_fail/p3_fail/p4_fail → scored → reviewed
|
|
block_reason: str | None = None
|
|
hash: str | None = None
|
|
id: int | None = None
|