GlucoPulse
Reliable glucose forecasting from streaming sensor data
A fault-tolerant data and ML pipeline that validates continuous-glucose-monitor readings, trains a Temporal Fusion Transformer, and serves 30- and 60-minute forecasts through FastAPI and ONNX Runtime.
Corrupted readings, duplicate events, and undetected sensor gaps can silently degrade glucose forecasts even when every service appears healthy.
Kafka decouples sensor replay from ingestion, while TimescaleDB stores validated time-series records and Grafana exposes pipeline health.
Data-quality checks removed 429 exact duplicates and routed 394 conflicting measurements to a dead-letter queue before model training.
Airflow and PySpark orchestrate feature engineering with quality gates that exclude patient-weeks containing large sensor gaps.
A standalone FastAPI and ONNX service serves full-history predictions with a PyTorch fallback for shorter histories.
Processed 306,712 readings from 25 patients. On four unseen patients, the Temporal Fusion Transformer reduced 60-minute RMSE from a 42.10 mg/dL persistence baseline to 37.65 mg/dL.