triton-inference-server / client

Triton Python, C++ and Java client libraries, and GRPC-generated client examples for go, java and scala.
BSD 3-Clause "New" or "Revised" License
551 stars 227 forks source link

feat: Client-side input shape/element validation #742

Open yinggeh opened 3 months ago

yinggeh commented 3 months ago

What does the PR do?

Add client input size check to make sure input shape byte size matches input data byte size.

Checklist

Commit Type:

Check the conventional commit type box here and add the label to the github PR.

Related PRs:

https://github.com/triton-inference-server/server/pull/7427

Where should the reviewer start?

src/c++/library/common.cc src/python/library/tritonclient/grpc/_infer_input.py src/python/library/tritonclient/http/_infer_input.py

Test plan:

n/a

Caveats:

Shared memory byte size checks for string inputs is not implemented.

Background

Stop malformed input request at client side before sending to the server.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

Relates to https://github.com/triton-inference-server/server/issues/7171

yinggeh commented 2 months ago

There is a known issue with TensorRT (Jira DLIS-6805 ) which causes TRT tests to fail again at client (CI job 102924904). There is no way to know the platform of inference model at the client side. Should we wait until @pskiran1 finish his change first? CC @tanmayv25 @GuanLuo @rmccorm4

pskiran1 commented 2 months ago

There is a known issue with TensorRT (Jira DLIS-6805 ) which causes TRT tests to fail again at client (CI job 102924904). There is no way to know the platform of inference model at the client side. Should we wait until @pskiran1 finish his change first? CC @tanmayv25 @GuanLuo @rmccorm4

@yinggeh, I just merged DLIS-6805 changes, could you please try with the latest code?