← Back to blog

Fixing Label Leakage in Stormwatch AI: From 99.7% to a Trustworthy 88.3%

July 20, 2026

machine-learningmlopscase-study

When a rainfall model reports 99.7% accuracy, the right reaction isn’t celebration — it’s suspicion.

While building Stormwatch AI, a set of models forecasting cyclones, heatwaves, and rainfall across 15 Indian cities, one of the rainfall models kept scoring implausibly high. Real-world rainfall prediction from weather station data does not look like that.

Finding the leak

The leakage traced back to features that encoded information only available after the event being predicted — a classic case of the training pipeline peeking into the future. Three models across the pipeline shared the same feature-engineering step, so the bug wasn’t isolated to one notebook; it was systemic.

The fix

The rainfall model landed at 88.3% accuracy — lower, but real. That number now ships behind a 5-endpoint FastAPI service with an MLflow registry, and KS-test drift monitoring keeps watch for the next time a feature quietly starts leaking the future.

Stack: Python, XGBoost, FastAPI, MLflow, PySpark, GitHub Actions