This project is aimed at predicting the fee of a Uber ride using machine learning techniques. As a classical project, it contains:
- training/exploration repo for ML and datascience
- app repo with functions to deploy the ML model and associated unit tests. The code of this repo is formatted by a linter.
- devops repo for potential CI/CD
- infra repo to show an example of infrastructure as a code (IAC)
- The
trainingdirectory contains a Jupyter Notebook (model_training.ipynb) where the machine learning model is developed and trained. - To reproduce the model or experiment with different data, navigate to the
trainingdirectory and follow the instructions in the notebook.
The App is designed as following:
- Description: This stage serves as the initial trigger point for the workflow.
- Trigger Event: It can be initiated by an event such as a user's action (e.g., requesting a ride) or through a scheduled job.
- Description: After the trigger event, the workflow places the task or job into a queue.
- Purpose: Queues are used for managing asynchronous tasks and ensuring efficient processing.
- Description: This stage trigger the second application that makes the real process.
- Description: In this stage, the workflow makes an HTTP request to an external API to retrieve meteorological (weather) data.
- Description: This stage reads the model into the data lake.
- Description: The workflow concludes by sending a callback or notification.
- The
appdirectory includes an Azure web application designed to make predictions based on the trained machine learning model. - You can deploy this app on Azure to provide a user-friendly interface for predicting Uber ride fees.
- The
devopsdirectory contains the necessary configuration and scripts for implementing CI/CD for the Azure app. - We use Azure DevOps to automate the build and deployment processes.
- The
infradirectory holds the infrastructure as code (IaC) scripts that define the resources needed to run the Azure app. - These scripts can be used with tools like Terraform to provision and manage the required infrastructure.
Follow these steps to get started with the project:
-
Clone this repository to your local machine, preferrably on VSCode:
git clone https://github.com/C-BdB/vtc.git
-
Install dependancies of the requirements.txt
-
Install Azurite Extension on VSCode, Azure Functions Core tools
-
Use Postman to send requests (see the body of a typical request in the app/api_definition repository
-
Prepare a webhook to receive the asynchronous response
-
Run the code
func host start
