feat: error handling, retry with backoff, and circuit breaker
Add robust error handling to the evolution loop and LLM adapters: - Retry utility with exponential backoff for transient errors (429, 5xx, timeouts) - Per-call error isolation in evaluator and judge adapter - Circuit breaker in EvolutionLoop (trips after N consecutive failures) - CLI flags: --max-retries, --error-strategy (skip|retry|abort) - Config fields: max_retries, retry_delay_base, circuit_breaker_threshold, error_strategy - 16 new unit tests covering all error handling paths Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -38,6 +38,12 @@ class OptimizationConfig:
|
||||
# --- Reproducibility ---
|
||||
seed: int = 42
|
||||
|
||||
# --- Error handling ---
|
||||
max_retries: int = 3
|
||||
retry_delay_base: float = 1.0
|
||||
circuit_breaker_threshold: int = 5
|
||||
error_strategy: str = "retry" # skip | retry | abort
|
||||
|
||||
# --- Output ---
|
||||
output_path: str = "output.yaml"
|
||||
verbose: bool = False
|
||||
|
||||
Reference in New Issue
Block a user