Metadata-Version: 2.1
Name: BentoML
Version: 0.6.2
Summary: A platform for serving and deploying machine learning models in the cloud
Home-page: https://github.com/bentoml/BentoML
Author: bentoml.org
License: Apache License 2.0
Project-URL: Bug Reports, https://github.com/bentoml/BentoML/issues
Project-URL: Source Code, https://github.com/bentoml/BentoML
Project-URL: Slack User Group, https://bit.ly/2N5IpbB
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.4
Description-Content-Type: text/markdown
Requires-Dist: ruamel.yaml (>=0.15.0)
Requires-Dist: numpy
Requires-Dist: flask
Requires-Dist: gunicorn
Requires-Dist: click (>=7.0)
Requires-Dist: pandas
Requires-Dist: prometheus-client
Requires-Dist: python-json-logger
Requires-Dist: boto3
Requires-Dist: requests
Requires-Dist: packaging
Requires-Dist: docker
Requires-Dist: configparser
Requires-Dist: sqlalchemy (>=1.3.0)
Requires-Dist: protobuf (>=3.6.0)
Requires-Dist: grpcio
Requires-Dist: cerberus
Requires-Dist: tabulate
Requires-Dist: humanfriendly
Requires-Dist: alembic
Requires-Dist: python-dateutil (<2.8.1,>=2.1)
Provides-Extra: all
Requires-Dist: ruamel.yaml (>=0.15.0) ; extra == 'all'
Requires-Dist: numpy ; extra == 'all'
Requires-Dist: flask ; extra == 'all'
Requires-Dist: gunicorn ; extra == 'all'
Requires-Dist: click (>=7.0) ; extra == 'all'
Requires-Dist: pandas ; extra == 'all'
Requires-Dist: prometheus-client ; extra == 'all'
Requires-Dist: python-json-logger ; extra == 'all'
Requires-Dist: boto3 ; extra == 'all'
Requires-Dist: requests ; extra == 'all'
Requires-Dist: packaging ; extra == 'all'
Requires-Dist: docker ; extra == 'all'
Requires-Dist: configparser ; extra == 'all'
Requires-Dist: sqlalchemy (>=1.3.0) ; extra == 'all'
Requires-Dist: protobuf (>=3.6.0) ; extra == 'all'
Requires-Dist: grpcio ; extra == 'all'
Requires-Dist: cerberus ; extra == 'all'
Requires-Dist: tabulate ; extra == 'all'
Requires-Dist: humanfriendly ; extra == 'all'
Requires-Dist: alembic ; extra == 'all'
Requires-Dist: python-dateutil (<2.8.1,>=2.1) ; extra == 'all'
Requires-Dist: tox (>=3.12.1) ; extra == 'all'
Requires-Dist: tox-conda (>=0.2.0) ; extra == 'all'
Requires-Dist: flake8 ; extra == 'all'
Requires-Dist: twine ; extra == 'all'
Requires-Dist: setuptools ; extra == 'all'
Requires-Dist: gitpython (>=2.0.2) ; extra == 'all'
Requires-Dist: grpcio-tools ; extra == 'all'
Requires-Dist: pylint (>=2.3.1) ; extra == 'all'
Requires-Dist: black ; extra == 'all'
Requires-Dist: imageio (>=2.5.0) ; extra == 'all'
Requires-Dist: torch ; extra == 'all'
Requires-Dist: torchvision ; extra == 'all'
Requires-Dist: tensorflow ; extra == 'all'
Requires-Dist: fastai ; extra == 'all'
Requires-Dist: matplotlib ; extra == 'all'
Requires-Dist: xgboost ; extra == 'all'
Requires-Dist: h2o ; extra == 'all'
Requires-Dist: aws-sam-cli (==0.33.1) ; extra == 'all'
Requires-Dist: sphinx ; extra == 'all'
Requires-Dist: sphinx-click ; extra == 'all'
Requires-Dist: sphinx-rtd-theme ; extra == 'all'
Requires-Dist: sphinxcontrib-fulltoc ; extra == 'all'
Requires-Dist: recommonmark ; extra == 'all'
Provides-Extra: api_server
Requires-Dist: gunicorn ; extra == 'api_server'
Requires-Dist: prometheus-client ; extra == 'api_server'
Provides-Extra: dev
Requires-Dist: tox (>=3.12.1) ; extra == 'dev'
Requires-Dist: tox-conda (>=0.2.0) ; extra == 'dev'
Requires-Dist: flake8 ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'
Requires-Dist: setuptools ; extra == 'dev'
Requires-Dist: gitpython (>=2.0.2) ; extra == 'dev'
Requires-Dist: grpcio-tools ; extra == 'dev'
Requires-Dist: pylint (>=2.3.1) ; extra == 'dev'
Requires-Dist: black ; extra == 'dev'
Provides-Extra: doc_builder
Requires-Dist: sphinx ; extra == 'doc_builder'
Requires-Dist: sphinx-click ; extra == 'doc_builder'
Requires-Dist: sphinx-rtd-theme ; extra == 'doc_builder'
Requires-Dist: sphinxcontrib-fulltoc ; extra == 'doc_builder'
Requires-Dist: recommonmark ; extra == 'doc_builder'
Requires-Dist: ruamel.yaml (>=0.15.0) ; extra == 'doc_builder'
Requires-Dist: numpy ; extra == 'doc_builder'
Requires-Dist: flask ; extra == 'doc_builder'
Requires-Dist: gunicorn ; extra == 'doc_builder'
Requires-Dist: click (>=7.0) ; extra == 'doc_builder'
Requires-Dist: pandas ; extra == 'doc_builder'
Requires-Dist: prometheus-client ; extra == 'doc_builder'
Requires-Dist: python-json-logger ; extra == 'doc_builder'
Requires-Dist: boto3 ; extra == 'doc_builder'
Requires-Dist: requests ; extra == 'doc_builder'
Requires-Dist: packaging ; extra == 'doc_builder'
Requires-Dist: docker ; extra == 'doc_builder'
Requires-Dist: configparser ; extra == 'doc_builder'
Requires-Dist: sqlalchemy (>=1.3.0) ; extra == 'doc_builder'
Requires-Dist: protobuf (>=3.6.0) ; extra == 'doc_builder'
Requires-Dist: grpcio ; extra == 'doc_builder'
Requires-Dist: cerberus ; extra == 'doc_builder'
Requires-Dist: tabulate ; extra == 'doc_builder'
Requires-Dist: humanfriendly ; extra == 'doc_builder'
Requires-Dist: alembic ; extra == 'doc_builder'
Requires-Dist: python-dateutil (<2.8.1,>=2.1) ; extra == 'doc_builder'
Provides-Extra: test
Requires-Dist: pytest (>=4.1.0) ; extra == 'test'
Requires-Dist: pytest-cov (>=2.7.1) ; extra == 'test'
Requires-Dist: mock (>=2.0.0) ; extra == 'test'
Requires-Dist: coverage (>=4.4) ; extra == 'test'
Requires-Dist: codecov ; extra == 'test'
Requires-Dist: moto ; extra == 'test'
Requires-Dist: numpy ; extra == 'test'
Requires-Dist: imageio (>=2.5.0) ; extra == 'test'
Requires-Dist: aws-sam-cli (==0.33.1) ; extra == 'test'

[![pypi status](https://img.shields.io/pypi/v/bentoml.svg)](https://pypi.org/project/BentoML)
[![python versions](https://img.shields.io/pypi/pyversions/bentoml.svg)](https://travis-ci.org/bentoml/BentoML)
[![Downloads](https://pepy.tech/badge/bentoml)](https://pepy.tech/project/bentoml)
[![build status](https://travis-ci.org/bentoml/BentoML.svg?branch=master)](https://travis-ci.org/bentoml/BentoML)
[![Documentation Status](https://readthedocs.org/projects/bentoml/badge/?version=latest)](https://docs.bentoml.org/)
[![join BentoML Slack](https://badgen.net/badge/Join/BentoML%20Slack/cyan?icon=slack)](https://join.slack.com/t/bentoml/shared_invite/enQtNjcyMTY3MjE4NTgzLTU3ZDc1MWM5MzQxMWQxMzJiNTc1MTJmMzYzMTYwMjQ0OGEwNDFmZDkzYWQxNzgxYWNhNjAxZjk4MzI4OGY1Yjg)

> From ML model to production API endpoint with a few lines of code

[![BentoML](https://raw.githubusercontent.com/bentoml/BentoML/master/docs/source/_static/img/bentoml.png)](https://github.com/bentoml/BentoML)

BentoML makes it easy to __serve and deploy machine learning models__ in the cloud.

It is an open source framework for building cloud-native model serving services.
BentoML supports most popular ML training frameworks and deployment platforms, including
major cloud providers and docker/kubernetes.

👉 [Join BentoML Slack community](https://join.slack.com/t/bentoml/shared_invite/enQtNjcyMTY3MjE4NTgzLTU3ZDc1MWM5MzQxMWQxMzJiNTc1MTJmMzYzMTYwMjQ0OGEwNDFmZDkzYWQxNzgxYWNhNjAxZjk4MzI4OGY1Yjg)
 to hear about the latest development updates.

---

- [Getting Started](https://github.com/bentoml/BentoML#getting-started)
- [Documentation](https://docs.bentoml.org/)
- [Gallery](https://github.com/bentoml/gallery)
- [Contributing](https://github.com/bentoml/BentoML#contributing)
- [Releases](https://github.com/bentoml/BentoML#releases)
- [License](https://github.com/bentoml/BentoML/blob/master/LICENSE)
- [Blog](https://medium.com/bentoml)


## Getting Started

Installing BentoML with `pip`:
```bash
pip install bentoml
```

Creating a prediction service with BentoML:

```python
import bentoml
from bentoml.handlers import DataframeHandler
from bentoml.artifact import SklearnModelArtifact

@bentoml.env(pip_dependencies=["scikit-learn"]) # defining pip/conda dependencies to be packed
@bentoml.artifacts([SklearnModelArtifact('model')]) # defining required artifacts, typically trained models
class IrisClassifier(bentoml.BentoService):

    @bentoml.api(DataframeHandler) # defining prediction service endpoint and expected input format
    def predict(self, df):
        # Pre-processing logic and access to trained model artifacts in API function
        return self.artifacts.model.predict(df)
```

Train a classifier model with default Iris dataset and pack the trained model
with the BentoService `IrisClassifier` defined above:

```python
from sklearn import svm
from sklearn import datasets

if __name__ == "__main__":
    clf = svm.SVC(gamma='scale')
    iris = datasets.load_iris()
    X, y = iris.data, iris.target
    clf.fit(X, y)

    # Create a iris classifier service
    iris_classifier_service = IrisClassifier()

    # Pack it with the newly trained model artifact
    iris_classifier_service.pack('model', clf)

    # Save the prediction service to a BentoService bundle
    saved_path = iris_classifier_service.save()
```
You've just created a BentoService SavedBundle, it's a versioned file archive that is
ready for production deployment. It contains the BentoService you defined, as well as
the packed trained model artifacts, pre-processing code, dependencies and other
configurations in a single file directory.

You can start a REST API server by specifying the BentoService's name and version, or
provide the file path to the saved bundle:

```bash
bentoml serve IrisClassifier:latest
# or
bentoml serve {saved_path}
```

The REST API server provides web UI for testing and debugging the server. If you are
running this command on your local machine, visit http://127.0.0.1:5000 in your browser
and try out sending API request to the server. You can also send prediction request
with `curl` from command line:

```bash
curl -i \
  --header "Content-Type: application/json" \
  --request POST \
  --data '[[5.1, 3.5, 1.4, 0.2]]' \
  http://localhost:5000/predict
```

The BentoService SavedBundle directory is structured to work as a docker build context,
that can be used to build a API server docker container image:
build context directory:
```bash
docker build -t my_api_server {saved_path}
```

You can also deploy your BentoService to cloud services such as AWS Lambda
with `bentoml lambda` command. The deployment gives you a production-ready API endpoint
hosting the BentoService you specified:
```
> bentoml get IrisClassifier
BENTO_SERVICE                         CREATED_AT        APIS                       ARTIFACTS
IrisClassifier:20200121114004_360ECB  2020-01-21 19:40  predict::DataframeHandler  model::SklearnModelArtifact
IrisClassifier:20200120082658_4169CF  2020-01-20 16:27  predict::DataframeHandler  clf::PickleArtifact
...

> bentoml lambda deploy test-deploy -b IrisClassifier:20200121114004_360ECB
...
```

More detailed code and walkthrough of this example can be found in the [BentoML Quickstart Guide](https://docs.bentoml.org/en/latest/quickstart.html).

## Documentation

Full documentation and API references: [https://docs.bentoml.org/](https://docs.bentoml.org/)


## Examples

Visit [bentoml/gallery](https://github.com/bentoml/gallery) repository for more
 examples and tutorials.

#### FastAI

* Pet Image Classification - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/fast-ai/pet-image-classification/fast-ai-pet-image-classification.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/fast-ai/pet-image-classification/fast-ai-pet-image-classification.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/fast-ai/pet-image-classification/fast-ai-pet-image-classification.ipynb)
* Salary Range Prediction - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/fast-ai/salary-range-prediction/fast-ai-salary-range-prediction.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/fast-ai/salary-range-prediction/fast-ai-salary-range-prediction.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/fast-ai/salary-range-prediction/fast-ai-salary-range-prediction.ipynb)


#### Scikit-Learn

* Sentiment Analysis - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/scikit-learn/sentiment-analysis/sklearn-sentiment-analysis.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/scikit-learn/sentiment-analysis/sklearn-sentiment-analysis.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/scikit-learn/sentiment-analysis/sklearn-sentiment-analysis.ipynb)


#### PyTorch

* Fashion MNIST - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/pytorch/fashion-mnist/pytorch-fashion-mnist.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/pytorch/fashion-mnist/pytorch-fashion-mnist.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/pytorch/fashion-mnist/pytorch-fashion-mnist.ipynb)
* CIFAR-10 Image Classification - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/pytorch/cifar10-image-classification/pytorch-cifar10-image-classification.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/pytorch/cifar10-image-classification/pytorch-cifar10-image-classification.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/pytorch/cifar10-image-classification/pytorch-cifar10-image-classification.ipynb)


#### Tensorflow Keras

* Fashion MNIST - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/keras/fashion-mnist/keras-fashion-mnist.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/keras/fashion-mnist/keras-fashion-mnist.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/keras/fashion-mnist/keras-fashion-mnist.ipynb)
* Text Classification - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/keras/text-classification/keras-text-classification.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/keras/text-classification/keras-text-classification.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/keras/text-classification/keras-text-classification.ipynb)
* Toxic Comment Classifier - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/keras/toxic-comment-classification/keras-toxic-comment-classification.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/keras/toxic-comment-classification/keras-toxic-comment-classification.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/keras/toxic-comment-classification/keras-toxic-comment-classification.ipynb)

#### Tensorflow 2.0

* tf.Function model - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/tensorflow/echo/tensorflow-echo.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/tensorflow/echo/tensorflow-echo.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/tensorflow/echo/tensorflow-echo.ipynb)


#### XGBoost

* Titanic Survival Prediction - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/xgboost/titanic-survival-prediction/xgboost-titanic-survival-prediction.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/xgboost/titanic-survival-prediction/xgboost-titanic-survival-prediction.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/xgboost/titanic-survival-prediction/xgboost-titanic-survival-prediction.ipynb)
* League of Legend win Prediction - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/xgboost/league-of-legend-win-prediction/xgboost-league-of-legend-win-prediction.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/xgboost/league-of-legend-win-prediction/xgboost-league-of-legend-win-prediction.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/xgboost/league-of-legend-win-prediction/xgboost-league-of-legend-win-prediction.ipynb)

#### LightGBM

* Titanic Survival Prediction -  [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/lightbgm/titanic-survival-prediction/lightbgm-titanic-survival-prediction.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/lightbgm/titanic-survival-prediction/lightbgm-titanic-survival-prediction.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/lightbgm/titanic-survival-prediction/lightbgm-titanic-survival-prediction.ipynb)


#### H2O

* Loan Default Prediction - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/h2o/loan-prediction/h2o-loan-prediction.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/h2o/loan-prediction/h2o-loan-prediction.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/h2o/loan-prediction/h2o-loan-prediction.ipynb)
* Prostate Cancer Prediction - [Google Colab](https://colab.research.google.com/github/bentoml/gallery/blob/master/h2o/prostate-cancer-classification/h2o-prostate-cancer-classification.ipynb) | [nbviewer](https://nbviewer.jupyter.org/github/bentoml/gallery/blob/master/h2o/prostate-cancer-classification/h2o-prostate-cancer-classification.ipynb) | [source](https://github.com/bentoml/gallery/blob/master/h2o/prostate-cancer-classification/h2o-prostate-cancer-classification.ipynb)



### Deployment guides:

* Automated end-to-end deployment workflow with BentoML
  - [BentoML AWS Lambda Deployment Guide](https://docs.bentoml.org/en/latest/deployment/aws_lambda.html)
  - [BentoML AWS SageMaker Deployment Guide](https://docs.bentoml.org/en/latest/deployment/aws_sagemaker.html)

* Clipper Deployment
  - [BentoML Clipper.ai Deployment Guide](https://github.com/bentoml/BentoML/blob/master/guides/deployment/deploy-with-clipper/bentoml-clipper-deployment-guide.ipynb)

* Mannual Deployment
  - [BentoML AWS ECS Deployment](https://github.com/bentoml/BentoML/tree/master/guides/deployment/deploy-with-aws-ecs)
  - [BentoML Google Cloud Run Deployment](https://github.com/bentoml/BentoML/blob/master/guides/deployment/deploy-with-google-cloud-run/deploy-with-google-cloud-run.ipynb)
  - [BentoML Kubernetes Deployment](https://github.com/bentoml/BentoML/tree/master/guides/deployment/deploy-with-kubernetes)


## Contributing

Have questions or feedback? Post a [new github issue](https://github.com/bentoml/BentoML/issues/new/choose)
or discuss in our Slack channel: [![join BentoML Slack](https://badgen.net/badge/Join/BentoML%20Slack/cyan?icon=slack)](https://join.slack.com/t/bentoml/shared_invite/enQtNjcyMTY3MjE4NTgzLTU3ZDc1MWM5MzQxMWQxMzJiNTc1MTJmMzYzMTYwMjQ0OGEwNDFmZDkzYWQxNzgxYWNhNjAxZjk4MzI4OGY1Yjg)


Want to help build BentoML? Check out our
[contributing guide](https://github.com/bentoml/BentoML/blob/master/CONTRIBUTING.md) and the
[development guide](https://github.com/bentoml/BentoML/blob/master/DEVELOPMENT.md).


## Releases

BentoML is under active development and is evolving rapidly.
Currently it is a Beta release, __we may change APIs in future releases__.

Read more about the latest features and changes in BentoML from the [releases page](https://github.com/bentoml/BentoML/releases).



## Usage Tracking

BentoML by default collects anonymous usage data using [Amplitude](https://amplitude.com).
It only collects BentoML library's own actions and parameters, no user or model data will be collected.
[Here is the code that does it](https://github.com/bentoml/BentoML/blob/master/bentoml/utils/usage_stats.py).

This helps BentoML team to understand how the community is using this tool and
what to build next. You can easily opt-out of usage tracking by running the following
command:

```bash
# From terminal:
bentoml config set usage_tracking=false
```

```python
# From python:
import bentoml
bentoml.config().set('core', 'usage_tracking', 'False')
```

## License

[Apache License 2.0](https://github.com/bentoml/BentoML/blob/master/LICENSE)

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fbentoml%2FBentoML.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fbentoml%2FBentoML?ref=badge_large)


