Part 3: ML Model deployment with Flask and Docker

Welcome to part 3. In this part we will finally use a ML model! This article is widely referring to Part 1: Non-ML Model deployment with Flask and Docker so I suggest you read it before going into the following steps. In this article you will learn how to deploy a very simple machine learning model with Flask and run it in a container with Docker.

More precisely we will:

  • Create a production ready code with our machine learning model
  • Test our model
  • Create a web app serving our model
  • Containerize our web app

Machine learning model

The breast cancer datas et is…


Part 2: Non-ML Model deployment with Streamlit and Docker

Welcome to part 2. In this article you will learn how to deploy a very simple non machine learning model with Streamlit and build a container with Docker building on the work from Part 1.

More precisely we will:

  • Create a web app serving our model
  • Containerize our web app

And we will not Create a production ready code with our non-machine learning model nor Test our model since this part has been covered in Part 1.

Streamlit app

Streamlit is an open-source Python library that makes it easy to create and share beautiful, custom web apps for machine learning and data…


Part 1: Non-ML Model deployment with Flask and Docker

Welcome to part 1. Happy you made it through part 0 (Part 0: Setting up a ML project) which is not, let us be honest, the most exciting. In this article you will learn how to deploy a very simple non machine learning model with Flask and build a container with Docker.

More precisely we will:

  • Create a production ready code with our non-machine learning model
  • Test our model
  • Create a web app serving our model
  • Containerize our web app

Non-machine learning model

The non-machine learning model looks like this:


Part 0: Setting up a ML project

A good project starts with a good set-up. I believe that creativity can better strive in well structured project.

Here are the 3 main points and their associated tool that makes a good set-up for a ML project:

  • Reproducible environment with Anaconda
  • Structure with Cookie Cutter Data Science
  • Version control with Git

Anaconda

Anaconda is the de-facto open-source distribution of the Python and R programming languages for data science. In short conda remove you from the overhead (think maintenance!) of managing your packages and environment.

Why would you care? Because it is critical that when running a data science project that…


Introduction

There is one image that I find myself coming back again and again when I talk about data science and machine learning. A lot of people have seen it already but I still like it to show it since it is the reasoning behind this series of article called Beyond Jupyter notebooks.

The image in question is the Hidden Technical Debt in Machine Learning systems (see below) from the eponymous paper written by Google engineers (https://papers.nips.cc/paper/5656-hidden-technical-debt-in-machine-learning-systems.pdf).

Hidden Technical Debt in Machine Learning systems

As of today the title Data Scientist / Machine learning engineer can encompass quite a bit of different meaning depending on your organisation. But…

Greg Jan

End-to-end data scientist

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store