Projects / invoice-classification-mlops
Invoice classification with Blue/Green releases
Retraining, support and Blue/Green releases for an invoice classifier used daily by a finance team.
- Period
- 2024–2026
- Role
- MLOps and data scientist on enhancements and support
- Context
- Consumer-goods company
- Cloud
- Azure
[ Architecture ]
How it works
Run a scenario to follow a request through the system. Select a component to read its role and its flows.
finance team
Batch of invoices to classify
A batch of invoices sent from the finance systems.
- Press Classify a batch of invoices to watch the request go through the system.
- 01Finance teamInvoices ready for classification
- 02Traffic switchRequest routed to the live slot
- 03Blue slotData prepared · model applied · classes returned
- 04Traffic switchResponse passed back
- 05Finance teamClassified invoices available
- ✓The finance team gets each invoice with its predicted class. They never see which slot answered.
- 01Retraining & registryRetrained on recent invoices · version registered
- 02CI/CDPipeline triggered for the new version
- 03Green slotDeployed to the idle slot · checks on known cases pass
- 04Traffic switchTraffic switched to the green slot
- 05Blue slotPrevious version kept · rollback is one switch
- ✓The new model is live after passing its checks, and the previous version stays deployed for an instant rollback.
Problem
Invoices and business rules keep changing, so classification quality drifts. The finance team relies on the service daily, so every change has to ship without interruption and be reversible.
Data
Historical invoices with validated classes, plus recent invoices for periodic retraining.
Approach
- Periodic retraining. XGBoost and scikit-learn classifiers are retrained on recent data.
- Model registry. Each model is versioned with its metrics in Azure ML.
- Blue/Green releases. The pipeline deploys to the idle slot, checks it, then switches traffic.
Evaluation
Each retrained model is checked on known cases before traffic switches to it. The main classes reach about 90 % accuracy.
Result
The classifier has gone through several retraining cycles. A bad release is undone with one switch.
My role
I worked on enhancements and support: retraining, Azure DevOps pipelines with Blue/Green deployment and migration to Azure ML. I did not build the original model or service.