Repository navigation
fix(frontend): prepend KServe batch dim for Triton metadata - #14996
Conversation
Triton ModelConfig dims omit the batch axis. When max_batch_size > 0, ModelMetadata must prepend -1 so KServe v2 clients accept batched inputs. Fixes ai-dynamo#14969 Signed-off-by: Sumit Mishra <sah299610@gmail.com>
|
👋 Hi Sumit884-byte! Thank you for contributing to ai-dynamo/dynamo. Just a reminder: The 🚀 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughThe change adds batch-aware tensor shape construction and applies it to Triton input and output metadata in the KServe service. Tests cover batched, unbatched, empty, and multidimensional shapes. ChangesKServe shape metadata
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~15 minutes Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to KServe clients should receive correct tensor shapes for both batched and unbatched Triton models, with no unresolved merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
Signed-off-by: Sumit Mishra <sah299610@gmail.com>
|
Hi @ai-dynamo/dynamo-frontend-codeowners — this PR is waiting on a code owner review from this team to merge. It fixes #14969: KServe |
|
/ok to test c4467a9 |
Summary
ModelConfig.dimsto KServe v2ModelMetadatashape by prepending a variable batch dim (-1) whenmax_batch_size > 0, matching native Triton's KServe adapter.kserve_metadata_shape()used at both Triton input and output metadata call sites inmodel_metadata().TensorMetadatamapping as the datatype pass-through: KServe gRPC ModelMetadata leaks internal model_config.proto enum names instead of OIP wire datatype strings #14520 → fix(llm): report KServe datatypes by their wire names, not protobuf variants #14957 → dynamo.frontend Config::Triton metadata drops max_batch_size, KServe v2 clients get shape mismatch on batchable models #14969.Fixes #14969
Validation
pre-commit run --files lib/llm/src/grpc/service/kserve.rs lib/llm/src/grpc/service/tensor.rscargo fmt -p dynamo-llm -- --checkcargo clippy --no-default-features -p dynamo-llm --lib -- -W clippy::allcargo test -p dynamo-llm --no-default-features kserve_metadata_shape— 2 passedperf_analyzeragainst a Dynamo-registered Triton model withmax_batch_size > 0— not doneTest plan
dynamo-llmjobs passModelMetadatafor a Triton model withmax_batch_size > 0reportsshapewith a leading-1max_batch_size == 0still reportsdimsunchangedSummary by CodeRabbit