GithubHelp home page GithubHelp logo

kurhula / oreilly-transformers-nlp-mlops Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sinanuozdemir/oreilly-transformers-nlp-mlops

0.0 0.0 0.0 3.45 MB

Session on MLOps

Python 0.51% Jupyter Notebook 99.44% Dockerfile 0.06%

oreilly-transformers-nlp-mlops's Introduction

oreilly-logo

Deploying NLP Models in Production using MLOps

This repository contains code for the O'Reilly Live Online Training for Deploying NLP Models in Production using MLOps

This training provides an overview to the end-to-end Natural Language Processing pipeline including the initial model training, production deployment and serving, model evaluation, and continuous training cycles to combat model/data drift.

We look at various tools including PyTorch serve and MLflow to manage model versions and deploy them in a production infrastructure. We also see several code examples throughout the training around a semantic search use-case using BERT to help solidify the theoretical concepts being introduced.

Notebooks

Model Training/Serving with BERT

Model Drift with BERT

Deploying models with FastAPI

Cleaning Data

Installation

  1. Make sure you have FastAPI and uvicorn installed (it is in the requirements.txt)

Running the App

  1. From the deploy directory, run uvicorn api:app --reload to start your local flask app
  2. Test the app by going to http://localhost:8000/docs
Using Docker

In the deploy directory:

to build: docker build . --tag fastapi-demo:1

You may need to run with a specified paltform if you use a macbook with the M1 chip like I do: docker build . --tag fastapi-demo:1 --platform linux/amd64

to run: docker run -p 80:8000 --platform linux/amd64 fastapi-demo:1

navigate to http://localhost/docs

To deploy docker image to Heroku

Docs here

Tag image for Heroku: docker tag fastapi-demo:1 registry.heroku.com/oreilly-sinan-mlops/web

To push to Heroku: docker push registry.heroku.com/oreilly-sinan-mlops/web

To release new version: heroku container:release web -a oreilly-sinan-mlops

To see logs: heroku logs -a oreilly-sinan-mlops -t

Navigate to https://oreilly-sinan-mlops.herokuapp.com/docs

Instructor

Sinan Ozdemir is currently the Director of Data Science at Directly, managing the AI and machine learning models that power the company’s intelligent customer support platform. Sinan is a former lecturer of Data Science at Johns Hopkins University and the author of multiple textbooks on data science and machine learning. Additionally, he is the founder of the recently acquired Kylie.ai, an enterprise-grade conversational AI platform with RPA capabilities. He holds a Master’s Degree in Pure Mathematics from Johns Hopkins University and is based in San Francisco, CA.

oreilly-transformers-nlp-mlops's People

Contributors

sinanuozdemir 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.