From the course: Deploying Scalable Machine Learning for Data Science

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Best practices for API design for ML services

Best practices for API design for ML services

From the course: Deploying Scalable Machine Learning for Data Science

Start my 1-month free trial

Best practices for API design for ML services

- [Narrator] Here are some best practices to keep in mind when developing APIs for machine learning models. First, and probably most important, use a RESTful interface. We do that because it's easy for developers to work with HTTP and with JSON. Now, there are other protocols you could use like Thrift or Protocol Buffers. But really, those should be saved for high-volume high-performance applications. Use the Get or Post command to invoke machine learning calls over HTTP. Be sure to document your API. Swagger is a popular tool for automating RESTful API documentation. Now here are some general API best practices to keep in mind. First of all, name your endpoints, or your function calls, with informative names like Classify of Classify Iris. Use API tools like Plumber and Flask. This will save coding and debugging. Be sure to include the term API in the path of your URLs. This will help keep your APIs organized, and it makes it easier for developers. Also, include a version number in…

Contents