<#3107 [Core feature] BentoML plugin> Issue create...
# flyte-github
c
#3107 [Core feature] BentoML plugin Issue created by cosmicBboy ### Motivation: Why do you think this is important? Flyte is great for data processing/model training in potentially long-running compute processes, and in the context of machine learning, currently it only supports batch prediction. To make Flyte part of the full-stack ML model lifecycle, rather than extending the core scope of Flyte, we can integrate with tools like BentoML, which is a model serving tool that supports deploying to a wide variety of cloud platforms: https://docs.bentoml.org/en/latest/concepts/deploy.html#supported-cloud-platforms ### Goal: What should the final outcome look like, ideally? User story: As a data scientist/ML engineer, I can develop a model training pipeline that automatically deploys a serving endpoint to one of the BentoML-supported targets (see link above). Optionally, my pipeline may rely on a Flyte
signal
node that determines whether or not the bentoml model is deployed. ## High-level Proposal Introduce 2 new tasks and a "service" construct to facilitate deploying bentoml service APIs directly from a flyte task: • `bentoml_service`: a function decorator that allows end users to define a BentoML service, potentially in the same file as the Flyte task/workflow definitions. • `BentoMLBuildTask`: creates a Bento, which is basically a directory archive of a bunch of modules, config files, and other artifacts packaged by bentoml when calling the
bentoml.build
function or
bentoml build
CLI command. • `BentoMLDeployTask`: this would basically be a shell task that calls the following commands to deploy the Bento to some target cloud platform. This task would need to have secrets that enables the auto-deployment of the Bento to, e.g. AWS lambda without human intervention You can find a proof-of-concept for this integration here: flyteorg/flytekit#1355. Note: The POC has been only been tested locally (not on an actual Flyte workflow, and assumes that you have docker push credentials to AWS ECR). ### Describe alternatives you've considered 1. just have end-users roll their own solutions 2. only implement the
BentoMLTask
to build
Bento
archives for deployment in some other process 3. Instead of the
@bentoml_service
decorator, have end-users write the
bentoml.Service
definition in a separate file, where they have to make sure they read in the correct environment variables. ### Propose: Link/Inline OR Additional context No response ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte