Data / ML Systems / complete

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.

Tech stack
PythonPyTorchPyTorch LightningKafkaTimescaleDBPySparkAirflowFastAPIONNX RuntimeDockerGrafanaHugging Face Spaces
01 / Problem

Corrupted readings, duplicate events, and undetected sensor gaps can silently degrade glucose forecasts even when every service appears healthy.

02 / System
01

Kafka decouples sensor replay from ingestion, while TimescaleDB stores validated time-series records and Grafana exposes pipeline health.

02

Data-quality checks removed 429 exact duplicates and routed 394 conflicting measurements to a dead-letter queue before model training.

03

Airflow and PySpark orchestrate feature engineering with quality gates that exclude patient-weeks containing large sensor gaps.

04

A standalone FastAPI and ONNX service serves full-history predictions with a PyTorch fallback for shorter histories.

03 / Proof

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.