Giter Club home page Giter Club logo

predictive_maintenance_nsin_marinecorps's Introduction

Predictive_Maintenance_NSIN_MarineCorps

Project Description

This is a joint collaboration between NSIN and Marine Corps to build an end to end predictive maintenance solution. When we say we are going to deploy the model in production or productionalize the model, we are referring to integrating the machine learning model into an existing business application. In simple terms, we expose the ML model as REST API endpoints to serve the requests within the application platform or to direct user requests.

Teams

NSIN Team:

  1. Mahmoud Hamsho
  2. Grant Wilson
  3. Farid Nemri

Marine Corps Team:

  1. Howard Ting
  2. Dana Lain

Solution Architecture

Alt text

Flask It is a micro web framework written in Python. It helps us to develop application programming interface (API) or a web application that responds to the request.
NGINX is the web server and reverse proxy, that passes requests on to uWSGI.
uWSGI is an application server, which can communicate with the web server for receiving requests and forwards them to Flask via the WSGI protocol.
Docker computer program that performs operating-system-level virtualization, also known as containerization.
Jinja2 HTML framwork to interact with API.

Python Virtual Environment

Activate environment in Terminal:

  • source test-env/env/Scripts/activate

Deactivate environment in Terminal:

  • deactivate

Adding new libraries to requiremnet.txt:

  • pip freeze > requirements.txt

Activating environment in Pycharm:

  • Ctrl + Alt + S or File / Settings
  • Project: your-name-project / Project Interpreter / Gear Icon / Add ...
  • Choose New environment
  • in Location: set your path / to / venv
  • Project Interpreter : path / to / venv / Scripts / python.exe

Repository Folder Structure

  • config define configuration management framework. The idea is to make the app behave according to configuration preset selected by the APP_ENV environment variable, plus, add an option to override any configuration setting with a specific environment variable if required.
  • images contains static images that are displayed in repo.
  • test-env contains virtual environment used to run build model and build docker container.
  • model_dev contains data and code used to design feature engineering pipeline and train/save model.

Resources

  1. https://www.twilio.com/blog/deploy-flask-python-app-aws
  2. https://medium.datadriveninvestor.com/dockerizing-and-hosting-your-flask-web-app-rest-api-on-aws-ec2-9f9c189bf563
  3. http://alanpryorjr.com/2019-05-20-flask-api-example/
  4. https://github.com/noahgift/Python-MLOps-Cookbook
  5. https://www.toptal.com/flask/flask-production-recipes
  6. https://www.datacamp.com/community/tutorials/machine-learning-models-api-python
  7. https://sonusharma-mnnit.medium.com/building-a-microservice-in-python-ff009da83dac
  8. https://gabimelo.medium.com/developing-a-flask-api-in-a-docker-container-with-uwsgi-and-nginx-e089e43ed90e
  9. https://blog.usejournal.com/a-guide-to-deploying-machine-deep-learning-model-s-in-production-e497fd4b734a
  10. https://analyticsindiamag.com/hands-on-guide-to-machine-learning-model-deployment-using-flask/

predictive_maintenance_nsin_marinecorps's People

Contributors

hamshom avatar

Forkers

nuwancw

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.