Need details on KFS V2 based GRPC method for inference
See original GitHub issueWe have a few questions specific to KFS V2 based GRPC method for inference.
-
Is KFS V2 also meant to support tabular data based payload or only for tensor based ML/DL workload ?
-
As KFS V2 GRPC support only certain data types - https://github.com/kubeflow/kfserving/blob/master/docs/predict-api/v2/required_api.md#tensor-data-types. Is it recommended to extend KFS v2 GRPC protocol to support the other data types ?
In order to support additional data types, we are planning to take the following approach:
- Extend the KFS v2 GRPC to support the additional data types - String, Array, Date and Timestamp etc as part of message “InferInputTensor” as shown below:
message InferInputTensor
{
.......
string datatype = 2; -> *** Accept additional data types - String, Array, Date and Timestamp etc ***
.......
}
- Underlying value would still be an array of bytes to align with KFS V2 GRPC protocol. Data for additional data types - String, Array, Date and Timestamp etc will get into “byte_contents”.
message InferTensorContents
{
....
repeated bytes bytes_contents = 8; -> Values for additional data types will be added here in bytes format
}
Could you please comment on the approach, are there any other alternatives to support tabular data / other data types in KFS V2
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
kserve/grpc_predict_v2.proto at master - GitHub
Standardized Serverless ML Inference Platform on Kubernetes ... kserve/docs/predict-api/v2/grpc_predict_v2.proto ... Inference Server GRPC endpoints.
Read more >Simplifying and Scaling Inference Serving with NVIDIA Triton 2.3
Triton is the first inference serving software to adopt KFServing's new community standard gRPC and HTTP/REST data plane v2 protocols.
Read more >Core concepts, architecture and lifecycle - gRPC
An introduction to key gRPC concepts, with an overview of gRPC architecture and RPC life cycle.
Read more >V2 Inference Protocol - KServe Documentation Website
This document proposes a predict/inference API independent of any specific ML/DL framework and model server. The proposed APIs are able to support both...
Read more >How to make an ML model inference on KFServing ... - Medium
KFServing enables serverless inferencing on Kubernetes with containers ... and the ML model inference app, based on your performance needs.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @vegoutha, in my view the best practice to encode tabular data is to treat each column as a separate “input head” (i.e. a separate entry on the
inputs
array of the payload). This would give you the best control over your inputs, in terms of shape, documentation (i.e. metadata / model signature), data types, etc.Following your example, you could do something like:
Leaving aside the richer datatype discussion (i.e. supporting a string), this is already supported by design in the V2 protocol.
@adriangonz How you are planning to support Spark runtime in ML server that includes tabular based payload as shown below ?
For example: Here is spark model schema format
How you are trying to accommodate the input data for above data types using KFS V2 GRPC ?
As mentioned in the MLServer design doc(https://docs.google.com/document/d/1C2uf4SaAtwLTlBCciOhvdiKQ2Eay4U72VxAD4bXe7iU/edit#heading=h.druw8i7fuflr), this case it will be passed as
"content_type": "json"
right?