GithubHelp home page GithubHelp logo

steve-moses / xhec-mlops-project-student Goto Github PK

View Code? Open in Web Editor NEW

This project forked from artefactory/xhec-mlops-project-student

0.0 0.0 3.0 2.38 MB

Jupyter Notebook 99.66% Python 0.33% Shell 0.01%

xhec-mlops-project-student's Introduction

xhec-mlops-project-student

Table of Contents

Introduction

This project is a part of the MLOps course at xHEC. The main goal of the project is to apply machine learning operations (MLOps) principles to a student dataset, ensuring that the model is reproducible, scalable, and maintainable.

Setup

Environment Setup

To set up the environment, follow these steps:

Navigate to the project directory

cd xhec-mlops-project-student

Create a conda environment using the environment.yml file

conda env create -f environment.yml

Activate the conda environment

conda activate xhec-mlops

Install the dependencies

pip install -r requirements.txt

Run the app

cd src/web_service
uvicorn main:app --reload

Build Docker Image and Run Container

docker build -t <image-name:tag> -f <dockerfile-name> . 
docker run -p <host-port>:<container-port> <image-name:tag>

Data

The dataset used in this project is the abalone.csv file located in the data directory. This dataset contains information about abalones, which are a type of marine mollusk. The dataset is used to predict the age of abalones based on various physical measurements.

Exploratory Data Analysis (EDA)

The eda.ipynb notebook located in the notebooks directory contains exploratory data analysis of the abalone dataset. This notebook provides insights into the distribution of data, relationships between different variables, and other important aspects that can help in building a machine learning model.

Modelling

The modelling.ipynb notebook located in the notebooks directory contains the machine learning model built for predicting the age of abalones. This notebook includes data preprocessing, model training, and evaluation steps.

Modelling

Preprocessing

The preprocessing.py file located in the src/modelling directory contains functions for preprocessing the abalone dataset.

Predicting

The predicting.py file located in the src/modelling directory contains functions for making predictions using the trained machine learning model.

Utilities

The utils.py file located in the src/modelling directory contains utility functions used in the modelling process.

Modelling with Prefect and MLflow

The orchestration of the modelling process is handled using Prefect while tracking and logging is done via MLflow in a script named my_prefect.py. This script orchestrates the loading of data, preprocessing, training the model, logging metrics to MLflow, and saving the model.

Running the Modelling Script

  1. Start Prefect Server:

    • Navigate to the src/modelling directory.
    • Run:
    prefect server start --host 0.0.0.0
    
    • Configure Prefect:
    prefect config set PREFECT_API_URL=http://0.0.0.0:4200/api
    
  2. Start MLflow UI (In a new terminal tab or window):

    mlflow ui --host 0.0.0.0 --port 5002
    
  3. Execute the Flow:

    • With the Prefect server and MLflow UI running, execute your script:
    python my_prefect.py
    

Visit the Prefect UI at http://0.0.0.0:4200 and MLflow UI at http://0.0.0.0:5002 to monitor the progress and examine the logged metrics and model.

Continuous Integration

The project uses GitHub Actions for continuous integration. The configuration file for continuous integration is located in the .github/workflows/ci.yaml file.

Assets

The assets directory contains images used in the project, such as PR_right.png and PR_wrong.png.

Authors

Madhura Nirale, Dikens Celaj, Steve Moses, Amjad Rehan Ibrahim, Zofia Smolen, Kaan Caylan

xhec-mlops-project-student's People

Contributors

luca-serra avatar kaan-caylan avatar blackcow63 avatar betapekens avatar steve-moses avatar rehann2 avatar kaancaylan avatar madhuranirale1 avatar henrique-britoleao avatar julesbertrand avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.