Coder Social home page Coder Social logo

gjb117 / bentoml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bentoml/bentoml

0.0 0.0 0.0 61.99 MB

Build Production-Grade AI Applications

Home Page: https://bentoml.com

License: Apache License 2.0

Shell 2.53% JavaScript 0.07% C++ 0.09% Python 94.81% PHP 0.05% Java 0.12% Go 0.04% Kotlin 0.16% CSS 0.06% Swift 0.18% Makefile 0.12% Dockerfile 0.35% Starlark 0.86% Jinja 0.56%

bentoml's Introduction

bentoml

BentoML: The Unified AI Application Framework

pypi_status CI Twitter Community

BentoML is a framework for building reliable, scalable, and cost-efficient AI applications. It comes with everything you need for model serving, application packaging, and production deployment.

πŸ‘‰ Join our Slack community!

Highlights

πŸ„ Freedom to build with any AI models

  • Import from any model hub or bring your own models built with frameworks like PyTorch, TensorFlow, Keras, Scikit-Learn, and XGBoost.
  • Support all major ML frameworks, model formats, and model runtime.
  • Run and debug your BentoML apps locally on Mac, Windows, or Linux.

🍭 Simplify modern AI application architecture

🍱 Bento is the container for AI apps

  • Open standard for building AI apps, pack your code, model files, dependencies, and runtime configurations in one Bento β€œto-go”.
  • Auto-generate API servers, supporting REST API, gRPC, and long-running inference jobs.
  • Auto-generate Docker container images with just one command.

πŸš€ Deploy Anywhere

  • One-click deployment to ☁️ BentoCloud, the Serverless platform made for hosting AI apps.
  • Scalable BentoML deployment with πŸ¦„οΈ Yatai on Kubernetes.
  • Deploy auto-generated container images anywhere docker runs.

Documentation

πŸ› οΈ What you can build with BentoML

Getting Started

Save or import models in BentoML local model store:

import bentoml
import transformers

pipe = transformers.pipeline("text-classification")

bentoml.transformers.save_model(
  "text-classification-pipe",
  pipe,
  signatures={
    "__call__": {"batchable": True}  # Enable dynamic batching for model
  }
)

View all models saved locally:

$ bentoml models list
 Tag                                     Module                Size        Creation Time
 text-classification-pipe:kn6mr3aubcuf…  bentoml.transformers  256.35 MiB  2023-05-17 14:36:25

Define how your model runs in a service.py file:

import bentoml

model_runner = bentoml.models.get("text-classification-pipe").to_runner()

svc = bentoml.Service("text-classification-service", runners=[model_runner])

@svc.api(input=bentoml.io.Text(), output=bentoml.io.JSON())
async def classify(text: str) -> str:
    results = await model_runner.async_run(text)
    return results[0]

Now, run the API service locally:

bentoml serve service.py:svc

Sent a prediction request:

$ curl -X POST -H "Content-Type: text/plain" --data "BentoML is awesome" http://localhost:3000/classify

{"label":"POSITIVE","score":0.9129443168640137}%

Define how a Bento can be built for deployment, with bentofile.yaml:

service: 'service.py:svc'
name: text-classification-svc
include:
  - 'service.py'
python:
  packages:
  - torch>=2.0
  - transformers

Build a Bento and generate a docker image:

$ bentoml build
...
Successfully built Bento(tag="text-classification-svc:mc322vaubkuapuqj").
$ bentoml containerize text-classification-svc
Building OCI-compliant image for text-classification-svc:mc322vaubkuapuqj with docker
...
Successfully built Bento container for "text-classification-svc" with tag(s) "text-classification-svc:mc322vaubkuapuqj"
$ docker run -p 3000:3000 text-classification-svc:mc322vaubkuapuqj

For a more detailed user guide, check out the BentoML Tutorial.


Community

BentoML supports billions of model runs per day and is used by thousands of organizations around the globe.

Join our Community Slack πŸ’¬, where thousands of AI application developers contribute to the project and help each other.

To report a bug or suggest a feature request, use GitHub Issues.

Contributing

There are many ways to contribute to the project:

  • Report bugs and "Thumbs up" on issues that are relevant to you.
  • Investigate issues and review other developers' pull requests.
  • Contribute code or documentation to the project by submitting a GitHub pull request.
  • Check out the Contributing Guide and Development Guide to learn more
  • Share your feedback and discuss roadmap plans in the #bentoml-contributors channel here.

Thanks to all of our amazing contributors!


Usage Reporting

BentoML collects usage data that helps our team to improve the product. Only BentoML's internal API calls are being reported. We strip out as much potentially sensitive information as possible, and we will never collect user code, model data, model names, or stack traces. Here's the code for usage tracking. You can opt-out of usage tracking by the --do-not-track CLI option:

bentoml [command] --do-not-track

Or by setting environment variable BENTOML_DO_NOT_TRACK=True:

export BENTOML_DO_NOT_TRACK=True

License

Apache License 2.0

FOSSA Status

bentoml's People

Contributors

parano avatar aarnphm avatar yubozhao avatar bojiang avatar sauyon avatar dependabot[bot] avatar larme avatar ssheng avatar 1e0ng avatar jackyzha0 avatar frostming avatar yetone avatar jjmachan avatar timliubentoml avatar akainth015 avatar jianshen92 avatar tashakim avatar korusuke avatar mayurnewase avatar qu8n avatar lintingzhen avatar dtemir avatar jiewpeng avatar kimsoungryoul avatar mqk avatar liusy182 avatar telescopic avatar omkarmozar avatar sherlock113 avatar gregd33 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.