AsyncIO serving for data science models
Project description
Foxcross
AsyncIO serving for data science models built on Starlette
Requirements: Python 3.6.1+
Quick Start
Installation using pip
:
pip install foxcross
Create some test data and a simple model in the same directory to be served:
directory structure
.
+-- data.json
+-- models.py
data.json
[1,2,3,4,5]
models.py
from foxcross.serving import ModelServing, run_model_serving
class AddOneModel(ModelServing):
test_data_path = "data.json"
def predict(self, data):
return [x + 1 for x in data]
if __name__ == "__main__":
run_model_serving()
Run the model locally
python models.py
Navigate to localhost:8000/predict-test/
in your web browser, and you should see the
list incremented by 1. You can visit localhost:8000/
to see all the available
endpoints for your model.
Why does this package exist?
Currently, some of the most popular data science model building frameworks such as PyTorch and Scikit-Learn do not come with a built in serving library similar to TensorFlow Serving.
To fill this gap, people create Flask applications to serve their model. This can be error prone, and the implementation can differ between each model. Additionally, Flask is a WSGI web framework whereas Foxcross is built on Starlette, a more performant ASGI web framework.
Foxcross aims to be the serving library for data science models built with frameworks that do not come with their own serving library. Using Foxcross enables consistent and testable serving of data science models.
Security
If you believe you've found a bug with security implications, please do not disclose this issue in a public forum.
Email us at support@laac.dev
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
File details
Details for the file foxcross-0.10.0.tar.gz
.
File metadata
- Download URL: foxcross-0.10.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.4.0-28-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 869ea76cc1776a0e5483164ff9bf9a25b332ac0de08f798bb29f6c9607f53210 |
|
MD5 | 17d06772c9de0c7dbfc5cd21f927717b |
|
BLAKE2b-256 | fda3345788fc41315a57f2908f76766d9d97fffde2d1558bba33ddd4f88ecd84 |
File details
Details for the file foxcross-0.10.0-py3-none-any.whl
.
File metadata
- Download URL: foxcross-0.10.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.4.0-28-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 537cbe2acc704af1a75bd4390dbc2cf07ba773ab6f0bfee33393eaf738672676 |
|
MD5 | a2a9f225f8a2f46876ccebcfa2839a14 |
|
BLAKE2b-256 | 9bae36921f72070a8f7a22c26626c212cd39ce57b574b3c2679e086946784d1f |