Machine learning prediction serving
Project description
ServeIt lets you serve model predictions and supplementary information from a RESTful API in one line of code. Current features include:
Model prediction serving
Supplementary information endpoint creation
User-provided input validation and exception handling
Configurable request and response logging (work in progress)
Automatic JSON serialization of responses
Installation: Python 2.7 and Python 3.6
Installation is easy with pip: pip install serveit
Usage:
Deploy your model to an API endpoint with one line of code:
from serveit.server import ModelServer
# initialize the server with a model and a method to use
# for predictions
ModelServer(clf, clf.predict).serve()
Then check out your new API:
curl -XPOST 'localhost:5000/predictions'\
-H "Content-Type: application/json"\
-d "[[5.6, 2.9, 3.6, 1.3], [4.4, 2.9, 1.4, 0.2], [5.5, 2.4, 3.8, 1.1], [5.0, 3.4, 1.5, 0.2], [5.7, 2.5, 5.0, 2.0]]"
# [1, 0, 1, 0, 2]
Please see the examples directory for additional usage.
Supported libraries
Scikit-Learn
Keras
Coming soon:
TensorFlow
PyTorch
Building
You can build locally with: python setup.py
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ServeIt-0.0.3b1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dbecaf13885051bc3321f1d437fab3cfc698f52e2ee6c80eb69bc4e62c34bfd |
|
MD5 | 8b9900ac3dca5b88c3b435d605a4803d |
|
BLAKE2b-256 | 2bbe4c1958c2a669764669eade60a3235c3907a54dd6cbdd4b72b9fea76f52ab |