rohitg00/ai-engineering-from-scratch · error · ValueError
unknown operator: {self.operator}
Error message
unknown operator: {self.operator} What it means
Error "unknown operator: {self.operator}" thrown in rohitg00/ai-engineering-from-scratch.
Source
Thrown at certifications/claude/lessons/32-architect-professional-system-capstone/code/main.py:60
hard_gate: bool = False
@dataclass(frozen=True)
class EvaluationGate:
metric: str
observed: float
operator: str
threshold: float
segment: str = "all"
def passes(self) -> bool:
operations = {
">=": lambda value, target: value >= target,
"<=": lambda value, target: value <= target,
"==": lambda value, target: value == target,
}
if self.operator not in operations:
raise ValueError(f"unknown operator: {self.operator}")
return operations[self.operator](self.observed, self.threshold)
@dataclass(frozen=True)
class ArchitecturePacket:
outcome: str
non_goals: tuple[str, ...]
requirements: tuple[Requirement, ...]
decisions: tuple[Decision, ...]
controls: tuple[Control, ...]
evaluation_gates: tuple[EvaluationGate, ...]
rollback_runbook: str
operating_owner: str
@dataclass(frozen=True)
class Finding:
category: strView on GitHub (pinned to 39ea8a1c6d)
When it happens
Trigger: Thrown at certifications/claude/lessons/32-architect-professional-system-capstone/code/main.py:60 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of rohitg00/ai-engineering-from-scratch@39ea8a1c6d (2026-08-26).
Data as JSON: /api/errors/9860ac2cbeb42781.
Report an issue: GitHub.