Skip to content

Complete end-to-end MlOps implementation for training, maintaining and monitoring a machine learning model that predicts the price of an old (second hand) car based on several different relevant factors.

License

Notifications You must be signed in to change notification settings

rishikeshF/old_car_price_prediction_mlops

Repository files navigation

old_car_price_prediction_mlops

Complete end-to-end MlOps implementation for training, maintaining and monitoring a machine learning model that predicts the price of an old (second hand) car based on several different relevant factors.

Frameworks used :

MlFlow - For Experiment Tracking, Model registry
Prefect - For model orchestration
Flask and Docker - For Deployment
Grafana - For Drift detection / Monitoring

Environment setup :

Create a virtual environment using the provided requirements.txt and run the code below in the same.

Model creation/EDA :

Ipython notebooks regarding model creation are provided in 'ML-experiments' folder.

How to use MlFlow for experiment tracking ?

cd into the project folder where 'mlflow.db' is located. Use the command mlflow ui --backend-store-uri sqlite:///mlflow.db to start the GUI for mlflow. You can view the dashboard in chrome browser at "http://127.0.0.1:5000" (default port) A dashboard as show below will be generated. The models tab allows the user for model versioning.

image

image

How to use Prefect for model orchestration ?

Set up an api to use PREFECT using the command prefect config set PREFECT_API_URL=http://127.0.0.1:4200/api Then, start the server using prefect server start This will start the UI at http://127.0.0.1:4200

image

image

Use the deployment tab to schedule runs to train or deploy the model.

image

How to deploy the model ?

Two types of deployment are provided.

  1. One is using simple model's pickle file, FLASK API and Docker.
  2. Second way is to use the Models from Model registry and deploy it using Docker file.

Docker images are provided in both the ways which can be easily used to deploy the model at any platform of your choice.

Model Monitoring

As the dataset used in this problem statement is of static nature, Drift is checked for in test dataset with respect to training dataset. The code and visualizations for the same are available in 'Monitoring' folder.

image

image

Upcoming updates :

  1. Model deployed as a web service on Hugging Face spaces

About

Complete end-to-end MlOps implementation for training, maintaining and monitoring a machine learning model that predicts the price of an old (second hand) car based on several different relevant factors.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages