-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support batch inference #3099
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3099 +/- ##
==========================================
- Coverage 33.45% 32.90% -0.55%
==========================================
Files 106 132 +26
Lines 9769 10652 +883
Branches 1685 1771 +86
==========================================
+ Hits 3268 3505 +237
- Misses 6270 6914 +644
- Partials 231 233 +2
|
ah next time you can also do a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick comments b4 I forgot about them :)
@@ -0,0 +1,193 @@ | |||
from __future__ import annotations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be under src/bentoml/_internal/distributed/spark.py
? @sauyon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe batch
, but it doesn't really matter right now.
Co-authored-by: Quan Nguyen <quandollar@users.noreply.github.com>
Co-authored-by: Quan Nguyen <quandollar@users.noreply.github.com>
examples/batch_processing/service.py
Outdated
@svc.api( | ||
input=PandasDataFrame(), | ||
output=PandasSeries(dtype="float"), | ||
) | ||
async def classify1(input_series: pd.DataFrame) -> pd.Series: | ||
return await PandasDataFrame(iris_clf_runner.predict.async_run(input_series)) | ||
|
||
@svc.api( | ||
input=PandasSeries(), | ||
output=PandasSeries(), | ||
) | ||
async def classify2(input_series: pd.Series) -> pd.Series: | ||
return await PandasSeries(iris_clf_runner.predict.async_run(input_series)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: let sname the endpoint something more helpful.
Development now track at #3425 |
Awesome work on this one 🎉 |
What does this PR address?
BentoML supports serving models online through HTTP and gRPC but needs more support for batch and streaming inference. Integrating with Apache Spark helps bridge the gap. This PR involves allowing users to create Spark UDFs with BentoML-packaged ML models in different types of environment.
Fixes #890
Before submitting:
guide on how to create a pull request.
make format
andmake lint
script have passed (instructions)?those accordingly? Here are documentation guidelines and tips on writting docs.