Machine Learning Model as API - [A Tutorial]

in #machine-learning6 years ago

Resources #67.png


Nicholas Walsh, a developer at Datmo, has created a tutorial on Medium about how to deploy a machine learning model as an API using Datmo, Falcon, Gunicorn, and Python. As per Nicholas:

"The goal of this tutorial is to showcase how you can go from a local machine learning model to a deployed API, empowering yourself (or others) to develop smart applications that leverage the the ML and AI work you’re already doing without needing to localize the machine learning code." [source]

To be able to follow along you will need:

  • an AWS account (can be obtained for free)
  • an account with Datmo (can also be obtained for free)

In the example provided by Nicholas, he uses an Iris dataset on which he trained a Random Forest Classifier. He provides this model as 'pickle' file, which is a good Pythonic way to save trained models.

Starting with a good graphical look at the architecture of their ML API microservice, Nicholas goes about:

  • writing a predict function for the model
  • setting up a Falcon API gateway (you'll know what this is if you follow the code)
  • writing the data handler
  • implementing reproducibility with Datmo
  • and a live example of how to deploy the model.

This is a pretty dense tutorial and it might take a few hours to completely reproduce if you want to follow along. If you do that, I'm pretty positive you'll have a better understanding of the whole concept of Machine Learning as a Service (MLAAS), which could prepare you in case you decide to seek work in this field.

Important to note is that this is not newbie friendly and you'd have to be familiar with many concepts of ML, as well as concepts not related to it. So, make sure you know where you stand before spending hours onto a task that may be outside your grasp. Should you decide to go further, follow the link below:

Machine Learning Model as API - [A Tutorial]


To stay in touch with me, follow @cristi


Cristi Vlad Self-Experimenter and Author

Sort:  

This is programming at it's peak and fascinating too.
Smart applications is taking over tech sector.
Awesome post

good work,

artificial neural network is so popular nowadays. btw... i need to check that link later. TQ

Thank you friends @cristi already share about phiton and API hopefully your writing can be useful for all people who are learning about pogram good computer, thanks greetings from me

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 63960.62
ETH 3142.95
USDT 1.00
SBD 3.95