Indicators cycle recomputes the CaMa survival scenario points over each new build; the figure draws them

This commit is contained in:
Roberto Treviño Cervantes
2026-11-22 23:22:31 -06:00
parent 93649a0e27
commit 32483249c7
3 changed files with 101 additions and 5 deletions
+4 -3
View File
@@ -49,12 +49,13 @@ def _short(value: Any) -> str:
def _warm_models(dominio: str) -> dict[str, Any]:
"""Leaves the members of the domain's live models labelled over the new build, so the API reads them instead of the build."""
from webapi.model_analysis import warm
"""Leaves the members of the domain's live models labelled over the new build, so the API reads them instead of the build,
and their scenario points computed by the pipeline over those members."""
from webapi.model_analysis import refresh_subgroups, warm
started = time.monotonic()
try:
resumen = warm(dominio)
resumen = {"cargados": warm(dominio), "escenarios_recalculados": refresh_subgroups(dominio)}
except Exception as exc: # the indicators are already saved
log.exception("no se pudieron preparar los modelos de %s", dominio)
resumen = f"error: {type(exc).__name__}"