From 44116f3f3f08dee3662537027675e27927707d45 Mon Sep 17 00:00:00 2001 From: PedroHMCosme Date: Wed, 7 Oct 2026 16:14:43 -0300 Subject: [PATCH] docs(simple_metrics): document min samples guard and adaptive state step (SIENTIAPDE-2191) --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 66f59be..2c3be54 100644 --- a/README.md +++ b/README.md @@ -489,14 +489,16 @@ The **SimpleMetrics** workflow calculates regression metrics (RMSE, MSE, MAE, R 1. **Data Loading**: Loads prediction vs target data via a JOIN query 2. **Metrics Calculation**: Calculates configured regression metrics; alerts on `simple_metrics_thresholds` breaches (one alert per model, the message names the window) unless the window has fewer rows than `simple_metrics_min_samples` 3. **Data Export**: Exports metrics to PostgreSQL +4. **Adaptive State** (only with thresholds): when the schedule's `pipelines` doc has `frequency_alert`, escalates `adaptive_state` on a breach and recovers after the window is renewed without one (`min(12, ceil(interval_minutes / frequency_alert))` runs; empty or under-sampled windows count as healthy). The orchestrator runs the schedule at `frequency_alert` while escalated #### Architecture Diagram ```mermaid flowchart LR - A[1. load_custom_query] --> B[2. calculate_simple_metrics] --> C[3. export_data_to_postgres] + A[1. load_custom_query] --> B[2. calculate_simple_metrics] --> C[3. export_data_to_postgres] --> D[4. update_simple_metrics_adaptive_state] A -.-> Database[(Database)] C -.-> PostgreSQL[(PostgreSQL)] + D -.-> MongoDB[(MongoDB pipelines)] ``` #### Input Parameters