Back to projects

MLOps — Open-source project

Breast Cancer MLOps Platform

Breast Cancer MLOps Platform project illustration
Open full-size image

Context

A model that performs well during training is not, by itself, an operational ML system. Once exposed through an API, its experiments, data, and parameters must be traceable; the model version behind each prediction must be identifiable; its environment must be reproducible; and service issues must be detectable. This project uses the public Wisconsin Breast Cancer dataset as a case study to design and demonstrate the full MLOps workflow, from experimentation to monitored inference. It focuses on engineering practices and is not a diagnostic tool or a medical decision support system.

Summary

An MLOps platform covering data preparation, model training and evaluation, registration in MLflow, API deployment, and operational monitoring. Each prediction identifies the version of the model used. Experiments and service metrics make it easier to track models and monitor API activity.

Contributions

  • Reproducible ML pipeline: Data validation and preparation, Random Forest classifier training with scikit-learn, evaluation, and tracking of experiments, metrics, and artifacts in MLflow.
  • Model management and serving: Versioning with MLflow Model Registry, metadata in PostgreSQL, artifacts in MinIO, and a FastAPI inference API returning the prediction, probabilities, and version of the loaded model.
  • Quality and observability: Prometheus metrics and Grafana dashboards to monitor the API, predictions, and active model; automated tests, Docker Compose, uv, Ruff, and a CI/CD pipeline with GitHub Actions.

Results

  • Executable ML lifecycle: Training and inference run locally in a Docker Compose environment.
  • Versioned experiments and models: Experiments and models registered in MLflow, with the served model selected by alias.
  • Four dashboards: Grafana dashboards for reviewing API availability, performance, predictions, and received inputs.

Value

  • Traceability: Experiments, artifacts, and model versions can be retrieved and compared.
  • Identifiable inference: API responses indicate which model version produced a prediction, making changes easier to track.
  • Easier operations: Metrics and dashboards expose errors, latency, and service behavior.
  • Reproducibility: Containerization, dependency management, and automated checks make the project easier to reproduce and evolve.

Technical stack

Python · scikit-learn · MLflow · FastAPI · Pydantic · PostgreSQL · MinIO · Prometheus · Grafana · Docker Compose · uv · pytest · Ruff · GitHub Actions

Evaluation on the test set

On 114 test samples, the model correctly classifies 109 cases (95.6%). Of the 42 malignant samples, 39 are correctly classified and 3 are classified as benign, giving a sensitivity of 92.9% for the malignant class. These results are limited to this experimental dataset and do not constitute clinical validation.