porter is a framework for exposing machine learning models via REST APIs.
Project description
porter
Testing | |
Documentation | |
Meta |
porter
is a framework for data scientists who want to quickly and reliably deploy machine learning models as REST APIs.
Simplicity is a core goal of this project. The following 6 lines of code are a fully functional example. While this should the most common use case, porter
is also designed to be easily extended to cover the remaining cases not supported out of the box.
from porter.datascience import WrappedModel
from porter.services import ModelApp, PredictionService
my_model = WrappedModel.from_file('my-model.pkl')
prediction_service = PredictionService(model=my_model, name='my-model', api_version='v1')
app = ModelApp([prediction_service])
app.run()
Features include:
- Practical design: suitable for projects ranging from proof-of-concept to production grade software.
- Framework-agnostic design: any object with a
predict()
method will do, which meansporter
plays nicely with sklearn, keras, or xgboost models. Models that don't fit this pattern can be easily wrapped and used inporter
. - OpenAPI integration: lightweight, Pythonic schema specifications support automatic validation of HTTP request data and generation of API documentation using Swagger.
- Boiler plate reduction:
porter
takes care of API logging and error handling out of the box, and supports streamlined model loading from.pkl
and.h5
files stored locally or on AWS S3. - Robust testing: a comprehensive test suite ensures that you can use
porter
with confidence. Additionally,porter
has been extensively field tested.
Installation
porter
can be installed with pip
for python3.9
and higher as follows:
pip install porter-schmorter # because porter was taken
For more details, see this page.
Documentation
For more information, see the documentation.
Project details
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
Close
Hashes for porter_schmorter-0.16.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eae6ef5784a21f20d1e003eed3a06591805f0792d91e598160468dd0d0e730c6 |
|
MD5 | 09ab803dc383f2eb21d3b2831b03a6a0 |
|
BLAKE2b-256 | ba5e4da34ce07e4d647e1165583b27734c620ad3cf03ad86f2d7ac4cf27a1b0d |