O'Reilly logo
live online training icon Live Online training

Minimum viable machine learning

Data

Graduating your models out of Jupyter and into production

Max Humber

You’ve built a cool model, but it’s stuck inside a Jupyter notebook. You want to get it in front of users, but you don’t quite know how. Breaking free of the Jupyter notebook seems like a daunting task. But it’s actually not that complicated.

Join expert Max Humber to learn how to deploy a machine learning model to Heroku, a popular platform as a service (PaaS) with a feature-filled free tier. You'll also discover how to take the next step and deploy applications to DigitalOcean, an inexpensive general cloud provider.

What you'll learn-and how you can apply it

By the end of this live online course, you’ll understand:

  • How to use HTML and CSS to create an MVP for a data model
  • How to choose between a PaaS and a cloud provider and how to deploy to both
  • Why you should make the development cycle as simple as possible

And you’ll be able to:

  • Use Travis CI for continuous deployment
  • Containerize data applications with Docker
  • Write templates that autogenerate HTML code

This training course is for you because...

  • You know Python, but you don’t know how to get your code in front of users.
  • You’re a data scientist or data engineer who works with Jupyter notebooks regularly.
  • You haven’t had time to learn frontend web development.

Prerequisites

  • Experience with Python, pandas, and scikit-learn
  • A machine with Docker Desktop installed
  • Heroku, TravisCI, and DigitalOcean accounts (useful but not required—They’re recommended to complete the exercises.)
  • Experience with Flask (useful but not required)

Recommended follow-up

About your instructor

  • Max Humber is a lead instructor at General Assembly and the author of Personal Finance with Python. He was the first data scientist at Borrowell and the second data engineer at Wealthsimple.

Schedule

The timeframes are only estimates and may vary according to how the class is progressing

Introduction (5 minutes)

  • Group discussion: Have you done frontend web development? Have you deployed a machine learning model?
  • Lecture: The problem with Jupyter

Model preparation (30 minutes)

  • Lecture: Model scaffold introduction; Git in the model development cycle; saving and pickling models
  • Hands-on exercise: Create a Git new branch to manage new changes
  • Q&A

App development with Flask (30 minutes)

  • Lecture: Beyond Flask, “Hello, World”; templates and the bare minimum of HTML and CSS; Jinja2 hacks; machine learning model
  • Hands-on exercise: Render the model behind an HTML page with Jinja2

Break (5 minutes)

Deploying to a PaaS (25 minutes)

  • Lecture: Setting up and configuring Heroku; connecting a Git repo to Heroku; configuring continuous deployment with Travis CI; connecting a custom domain name to Heroku
  • Hands-on exercise: Deploy to Heroku with Travis CI
  • Q&A

Deploying to a cloud provider (20 minutes)

  • Lecture: Setting up and configuring DigitalOcean; configuring server and NGINX; Dockerizing your data application; deploying to the cloud
  • Hands-on exercise: Dockerize a machine learning app