Skip to content
PERINGER Service Informatique, back to home

Back
Roller conveyors in an automated warehouse, with boxes and crates waiting to be sorted

Photo by Alberto Rodríguez on Unsplash

Engineering project

Machine-learning fraud detection in the supply chain

Flag likely fraud in an international logistics group’s shipment data with a machine-learning model served through an API.

Logistics and transportFastAPIRedisscikit-learnTeradataDockerOpenShift

The project

For an international logistics group, a machine-learning model assesses shipments to flag likely fraud. Shipment data stored in Teradata, consolidated files and business reference data feed features prepared upstream, including account and address references. The service exposes two REST endpoints, /train and /predict. FastAPI receives the requests, Redis holds the feature matrix, and results return as JSON to business rules, exception handling and alerting.

Engineering approach

Request handling, Redis data access and model computation are separate. Redis calls use asynchronous I/O, while training and prediction run in threads. The overview separates the API scope from the surrounding platform functions. Weekly retraining and result evaluation belong to the model lifecycle; business rules and alerts belong to operational processing.

Work delivered

A containerised fraud-detection service integrated into the logistics production flow. Applications send requests to the API and receive the model’s results as JSON, which business rules route to validation, exception handling or alerts.

My contribution
  • Development of the FastAPI /train and /predict routes, Pydantic validation and Redis data access
  • Integration of the prepared features, including account and address references, into the computation exposed by the API
  • Asynchronous I/O with asyncio and aioredis under Uvicorn, separated from training and prediction calculations executed through threads
  • Integration of scikit-learn and Joblib for model processing and caching; Python dependency management with Poetry
  • Organisation into two Docker services, FastAPI and Redis, deployed in a Kubernetes environment on OpenShift
  • Connection of the API to decision rules, exception handling and alert monitoring

Functional overview

Processing logic

Discuss your project

A discussion of your project’s design, development and production deployment.