mirror of
https://github.com/Haidra-Org/AI-Horde.git
synced 2026-11-06 05:17:31 +00:00
- compile_imagegen_stats_models/compile_textgen_stats_models carry per-model all-time counts forward from the previous snapshot and fold only rows past last_stat_id; day/month windows and model_id/model_state are recomputed each run since windows slide and model registration can reclassify - merge is a UNION ALL of baseline, id-range delta, and zero-contribution rows for every model in the 30-day window, so a model whose history sits inside the watermark gap still appears and self-corrects next run - measured on production data: 92.5s + 111s nightly becomes ~0.6s + ~1.5s (the irreducible 30-day windowed recompute); verified against ground-truth recomputes across bootstrap, no-op rerun, gap-fold, registration-flip, and pruning scenarios on a disposable postgres 16 - sql_statements/5.1.3.txt (last_stat_id columns on both compiled models tables, catalog-only ALTERs) must be applied before the release that carries it