INNER CODE UNIT · Python
GuideError
llm-d/llm-d · scripts/guide.py:156
class GuideError(Exception):
"""Raised when an operation cannot proceed (e.g. rendering a guide whose
README markers are malformed). Carries the ``Findings`` that caused it."""
def __init__(self, message: str, findings: Findings | None = None) -> None:
super().__init__(message)
self.findings = findings or Findings()
# --------------------------------------------------------------------------
# YAML loading — strict about duplicate keys
# --------------------------------------------------------------------------
#
# PyYAML's SafeLoader silently keeps the LAST value when a key repeats in a
# mapping. That masked a real bug in optimized-baseline where a `cleanup:` step
# had two `run:` entries and the intended delete was overwritten. Every entry
# point here uses this loader — the previous split scripts used it only in the
# YAML checker, so render and README-validation silently accepted duplicates