-
Notifications
You must be signed in to change notification settings - Fork 314
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
Adding Batch leap frame and a sample batch tf transformer #600
base: master
Are you sure you want to change the base?
Conversation
hey @ancasarb did you get a chance to have a look at the PR? |
This looks interesting. |
@lucagiovagnoli the gain we saw is mainly because the default leap frame is not utilising underlying libraries's ability to do parallel processing. Looks like in your case the xgboost library being used is itself having performance issues. however, as an exercise we can try using the parallel leap frame introduced in this PR for xgbooost as well and see if that gives more performance gain over and above to the changes you proposed in your PR |
Currently in mleap we only have default leapframe which applies transformation to the dataset row by row. However, as TF does support predictions over a batch of requests and is internally optimised for that, we can leverage the benefits in mleap using a batch leap frame. This increases the throughput and decreases the latencies as opposed to a sequential processing.
A BatchTransformer will take Seq[Row] as input and return back the transformed and enriched output as Seq[Row]
A sample BatchTensorflowTransformer is added in this PR
Here is a comparison in benchmarking numbers (using a Gatling client) between DefaultLeapFrame and BatchLeapFrame, for a simple LR model written in Tensorflow
The throughput gain is almost 2x
TF-Mleap-
TF-Mleap with Batching