This project aims to predict whether a credit card holder will default on their payment next month based on their demographic and payment history data.
Credit card companies need to be able to predict which customers are likely to default on their payments in order to minimize their financial losses. This project aims to build a machine learning model that can accurately predict whether a credit card holder will default on their payment next month based on their demographic and payment history data.
The dataset used in this project is the UCI Credit Card Default Payment dataset. It contains information on credit card holders in Taiwan from April 2005 to September 2005, including demographic data, payment history, and default payment status.
The project follows the following approach:
- Model training and evaluation : A machine learning model is trained evaluated
- Model tracking: The trained model is tracked using MLflow.
- Workflow automation: The model training process is automated using Prefect.
- Model deployment: The trained model is deployed using FastAPI.
- Model monitoring: The deployed model is monitored to ensure that it continues to perform well.
The project requires the following dependencies:
- Python 3.6 or higher
- Docker
To run the project, follow these steps:
- Clone the repository:
git clone https://github.com/amine-akrout/mlops-zoomcamp-capstone.git
- Setup the environment:
Make setup
- Run docker-compose:
Make docker-stack
This will start the MLflow server, the Prefect server, the Prefect agent and the fastapi (prdiction service) server. - Deploy the Prefect workflow:
Make deploy-prefect
Service Name | Port | Description |
---|---|---|
minio | 9000 | MinIO object storage server |
mlflow | 5000 | MLflow server for managing ML experiments |
mlflow_db | 3307 | MySQL database for MLflow |
phpmyadmin | 8081 | Web-based MySQL database administration |
fastapi-app | 8000 | FastAPI application |
mongo | 27017 | MongoDB database server |
mongo-express | 8082 | Web-based MongoDB administration |
prefect_server | 4200 | Prefect server for workflow management |
agent | N/A | Prefect agent for executing workflows |
prefect_deploy | N/A | Prefect deployment for workflows |
![]() |
![]() |
![]() |
![]() |