$30 off During Our Annual Pro Sale. View Details »

Kelner: serve your models

Kelner: serve your models

Elevator pitch talk about an open-source tool for serving saved machine learning models.

Leszek Rybicki

February 15, 2018

More Decks by Leszek Rybicki

Other Decks in Programming


  1. Kelner Serve Your Models

  2. Who is this? • Leszek Rybicki リビツキ レシェック github: @lunardog •

    Doing Image Recognition in Cookpad R&D since late 2016 • used to work in a real Research Lab, with mice, robots and things
  3. How do YOU deploy your ML models?

  4. @la t

  5. @la t

  6. Your model is too big for mobile deployment, so you’ll

    have to deploy it on the server side. Hook it up to our existing rails architecture and give me an API endpoint I can call with JSON requests. I’ll be sending you a couple thousand requests per second, so make sure the latency is below 150ms. Ask @in c if you get stuck. @ap c
  7. @ap c said you’re using Python. Well then, you have

    to make a django or flask app and run it on nginx via wsgi. Make sure you have the right versions of cuda and cudnn in your docker environment. Provision a P2 instance on EC2 on and put your files in S3 with the right ACLs. You may need a load balancer so let me know if you need help calibrating the field polarity of the auxiliary neutron flow capacitors... @in c

  9. pi -in l le do r-re C I se r

    H P po / ge en n J O sa m e s in s/o t s
  10. > pip install kelner > kelnerd --load-model model.h5 Using TensorFlow

    backend. Loading a Keras model from model.h5 Loaded. Starting server... Listening on Tha ’s i !
  11. > curl --data-binary "@dog.jpg" localhost:61453 -X POST -H"Content-Type: image/jpeg" (long

    JSON-encoded array of floats) > kelner -u http://localhost:61453 classify dog.jpg --top 5 --imagenet-labels boxer: 0.977385 Saint Bernard: 0.001139 Crock Pot: 0.000344 bull mastiff: 0.000275 Boston bull: 0.000214
  12. • Understands saved models • Keras + TF (more engines

    coming later) • Creates HTTP endpoints • Translates JSON to tensors and back • Some binary data support • MIT license • Coming very soon! Follow: @lunardog on Github KELNER
  13. THE END Questions? Issues? Pull Requests?

  14. FINE PRINT Kelner logo thanks to freelogodesign.org. Octocat images property

    of Github, used to symbolize various types of github-using developers who interact with Kelner. Logos of AWS services, Rails, Kotlin, Swift, Android, Docker and other, used to identify the respective services and languages. Time taken to develop Kelner courtesy of wonderful work atmosphere of Cookpad Inc., making everyday cooking FUN (and coding too)!
  15. https://info.cookpad.com/careers https://info.cookpad.com/en/careers