Slide 1

Slide 1 text

Deploy ML models by Pratik Parmar aka Pintudo

Slide 2

Slide 2 text

I AM Pratik Parmar Hello! And I am here to bore you with Machine Learning.

Slide 3

Slide 3 text

App Idea: Dog Breed classifier 0 And dogs are like...

Slide 4

Slide 4 text

Let’s talk about basic Machine Learning workflow 1

Slide 5

Slide 5 text

General Machine Learning Workflow

Slide 6

Slide 6 text

After evaluation The workflow for building machine learning models often ends at the evaluation stage: you have achieved an acceptable accuracy, and “ta-da! Mission Accomplished.”

Slide 7

Slide 7 text

Why ??? Maybe, going the extra mile to put your model into production is not always needed. And even when it is, this task is delegated to a system administrator.

Slide 8

Slide 8 text

“ During my course at Coursera I was always asking myself — I have my model, which I can run in Jupyter Notebook and see the result, but what can I do with it? How can other use it?

Slide 9

Slide 9 text

No matter how silly your project is, demonstrating our work is generally great way to get a wider audience interest Why Demo ??

Slide 10

Slide 10 text

How to deploy Machine Learning models? 2

Slide 11

Slide 11 text

How to deploy a ML model ? ? Data ML Algorithms ML Algorithms ML Algorithms Data Scientist Model App Development Production

Slide 12

Slide 12 text

? Any guess

Slide 13

Slide 13 text

Serving Serving is how you apply a ML model, after you’ve trained it

Slide 14

Slide 14 text

3 options to implement Machine Learning models Rewrite it Rewriting the whole code in the language that the software engineering folks work. API-first approach Create web API for your ML model using any web framework i.e. Flask or Django Tensorflow Serving TensorFlow Serving makes it easy to deploy new algorithms and experiments, while keeping the same server architecture and APIs. (API-first approach, but only for tensorflow)

Slide 15

Slide 15 text

Let’s get our hands dirty with the code 3

Slide 16

Slide 16 text

Create simple Web API for Dog Image Classifier Tensorflow Pretrained Model Flask REST API

Slide 17

Slide 17 text

? Which model to choose?

Slide 18

Slide 18 text

Pretrained model For the sake of this session, we’re gonna use retrained MobileNet Model

Slide 19

Slide 19 text

Main steps to to deploy Model are Train the model and saving the checkpoints on the disk Load saved model and test that it works properly Export model into Protobuf format (.pb) Create the client to issue requests and make an API

Slide 20

Slide 20 text

Protobuf Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. Export the model into Protobuf Tensorflow serving provides SavedModelBuild class to save the model as Protobuf.

Slide 21

Slide 21 text

Give some space because

Slide 22

Slide 22 text

Machine Learning for everyone

Slide 23

Slide 23 text

NO QUESTIONS PLEASE

Slide 24

Slide 24 text

Thank you for bearing me