An open framework for building, shipping and running machine learning services
Project description
BentoML
From a model in jupyter notebook to production API service in 5 minutes.
BentoML is a python framework for building, shipping and running machine learning services. It provides high-level APIs for defining an ML service and packaging its artifacts, source code, dependencies, and configurations into a production-system-friendly format that is ready for deployment.
Feature Highlights
-
Multiple Distribution Format - Easily package your Machine Learning models and preprocessing code into a format that works best with your inference scenario:
- Docker Image - deploy as containers running REST API Server
- PyPI Package - integrate into your python applications seamlessly
- CLI tool - put your model into Airflow DAG or CI/CD pipeline
- Spark UDF - run batch serving on a large dataset with Spark
- Serverless Function - host your model on serverless platforms such as AWS Lambda
-
Multiple Framework Support - BentoML supports a wide range of ML frameworks out-of-the-box including Tensorflow, PyTorch, Scikit-Learn, xgboost and can be easily extended to work with new or custom frameworks.
-
Deploy Anywhere - BentoML bundled ML service can be easily deployed with platforms such as Docker, Kubernetes, Serverless, Airflow and Clipper, on cloud platforms including AWS, Gogole Cloud, and Azure.
-
Custom Runtime Backend - Easily integrate your python pre-processing code with high-performance deep learning runtime backend, such as tensorflow-serving.
Installation
pip install bentoml
Verify installation:
bentoml --version
Getting Started
Defining a machine learning service with BentoML is as simple as a few lines of code:
@artifacts([PickleArtifact('model')])
@env(conda_pip_dependencies=["scikit-learn"])
class IrisClassifier(BentoService):
@api(DataframeHandler)
def predict(self, df):
return self.artifacts.model.predict(df)
Read our 5-mins Quick Start Guide, showcasing how to productionize a scikit-learn model and deploy it to AWS Lambda.
Documentation
Official BentoML documentation can be found at bentoml.readthedocs.io
Examples
All examples can be found under the BentoML/examples directory. More tutorials and examples coming soon!
- - Quick Start Guide
- - Scikit-learn Sentiment Analysis
- - H2O Classification
- - Keras Text Classification
- - XGBoost Titanic Survival Prediction
- (WIP) PyTorch Fashion MNIST classification
- (WIP) Tensorflow Keras Fashion MNIST classification
Deployment guides:
- Serverless deployment with AWS Lambda
- API server deployment with AWS SageMaker
- (WIP) API server deployment on Kubernetes
- (WIP) API server deployment with Clipper
We collect example notebook page views to help us improve this project.
To opt-out of tracking, delete the [Impression]
line in the first markdown cell of any example notebook: ![Impression](http...
Releases and Contributing
BentoML is under active development and is evolving rapidly. Currently it is a Beta release, we may change APIs in future releases.
To make sure you have a pleasant experience, please read the code of conduct. It outlines core values and beliefs and will make working together a happier experience.
Have questions or feedback? Post a new github issue or join our gitter chat room:
Want to help build BentoML? Check out our contributing guide and the development guide for setting up local development and testing environments for BentoML.
Happy hacking!
License
BentoML is under Apache License 2.0, as found in the LICENSE file.
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.