[#11292][feat] use smg-grpc-proto package for gRPC proto definitions#11578
[#11292][feat] use smg-grpc-proto package for gRPC proto definitions#11578juney-nvidia merged 1 commit intoNVIDIA:mainfrom
Conversation
…tions Replace local proto file, generated stubs, and compile script with the smg-grpc-proto PyPI package. Proto definitions are now owned by SMG and published as a versioned package, providing a single source of truth across SGLang, vLLM, and TensorRT-LLM. - Add smg-grpc-proto>=0.3.3 to requirements.txt - Remove local trtllm_service.proto, compile_protos.py - Update __init__.py to import from smg_grpc_proto.generated - Remove BuildPyWithProtoCompile from setup.py Signed-off-by: Chang Su <chang.s.su@oracle.com>
📝 WalkthroughWalkthroughThe changes migrate gRPC protobuf definitions from locally-managed source files to an external dependency package (smg-grpc-proto). The custom build process that compiled protobufs during setup is removed, and local proto definitions are replaced with imports from the external package. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tensorrt_llm/grpc/__init__.py (1)
1-1:⚠️ Potential issue | 🟡 MinorUpdate copyright year to
2026.The file is meaningfully modified by this PR. Per coding guidelines, the NVIDIA copyright header must reflect the year of latest meaningful modification.
🛠️ Proposed fix
-# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.As per coding guidelines: "All source files must contain an NVIDIA copyright header with the year of latest meaningful modification."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tensorrt_llm/grpc/__init__.py` at line 1, Update the SPDX copyright header in tensorrt_llm/grpc/__init__.py to reflect the latest meaningful modification year 2026 by changing the year in the existing header line (the SPDX/ copyright comment at the top of the file).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@tensorrt_llm/grpc/__init__.py`:
- Line 1: Update the SPDX copyright header in tensorrt_llm/grpc/__init__.py to
reflect the latest meaningful modification year 2026 by changing the year in the
existing header line (the SPDX/ copyright comment at the top of the file).
|
/bot run |
|
PR_Github #36225 [ run ] triggered by Bot. Commit: |
|
PR_Github #36225 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #36253 [ run ] triggered by Bot. Commit: |
|
PR_Github #36253 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #36309 [ run ] triggered by Bot. Commit: |
|
PR_Github #36309 [ run ] completed with state |
Extract raw image bytes from the MultimodalInput proto message, decode them as PIL images, and pass them to the LLM API via the multi_modal_data dict. The LLM API decodes token IDs back to text and re-processes through the model's input processor with images. Signed-off-by: Chang Su <chang.s.su@oracle.com>
Extract raw image bytes from the MultimodalInput proto message, decode them as PIL images, and pass them to the LLM API via the multi_modal_data dict. The LLM API decodes token IDs back to text and re-processes through the model's input processor with images. Signed-off-by: Chang Su <chang.s.su@oracle.com>
Extract raw image bytes from the MultimodalInput proto message, decode them as PIL images, and pass them to the LLM API via the multi_modal_data dict. The LLM API decodes token IDs back to text and re-processes through the model's input processor with images. Signed-off-by: Chang Su <chang.s.su@oracle.com>
…tokenized TokenSequence (#11888) Signed-off-by: Chang Su <chang.s.su@oracle.com>
Extract raw image bytes from the MultimodalInput proto message, decode them as PIL images, and pass them to the LLM API via the multi_modal_data dict. The LLM API decodes token IDs back to text and re-processes through the model's input processor with images. Signed-off-by: Chang Su <chang.s.su@oracle.com>
…f pre-tokenized TokenSequence (NVIDIA#11888) Signed-off-by: Chang Su <chang.s.su@oracle.com>
…VIDIA#11800) Signed-off-by: Chang Su <chang.s.su@oracle.com>
…f pre-tokenized TokenSequence (NVIDIA#11888) Signed-off-by: Chang Su <chang.s.su@oracle.com>
…VIDIA#11800) Signed-off-by: Chang Su <chang.s.su@oracle.com>
…f pre-tokenized TokenSequence (NVIDIA#11888) Signed-off-by: Chang Su <chang.s.su@oracle.com>
…VIDIA#11800) Signed-off-by: Chang Su <chang.s.su@oracle.com>
Summary by CodeRabbit
Release Notes
Description
Replace local proto file, generated stubs, and compile script with the
smg-grpc-protoPyPI package.Proto definitions are now owned by SMG (Shepherd Model Gateway) and published as a versioned package, providing a single source of truth across SGLang, vLLM, and TensorRT-LLM. This is the same migration pattern already applied to SGLang and vLLM upstream.
Changes:
smg-grpc-proto>=0.3.3torequirements.txt(requiresgrpcio>=1.78.0,protobuf>=5.26.0)trtllm_service.protoandcompile_protos.pyfromtensorrt_llm/grpc/tensorrt_llm/grpc/__init__.pyto import pb2 modules fromsmg_grpc_proto.generated(all downstream files continue usingfrom tensorrt_llm.grpc import ...unchanged)BuildPyWithProtoCompilecustom build hook fromsetup.pyWhat stays the same:
grpc_servicer.py,grpc_request_manager.py,serve.py,test_grpc.py— zero code changes (imports resolve through__init__.pyre-export)Context: Follow-up to #11292 which added the gRPC server. See smg-grpc-proto on PyPI and the ownership plan.
Test Coverage
tests/unittest/llmapi/test_grpc.pycovers proto message construction, sampling params conversion, and end-to-end gRPC service flow — all unchanged and passingPR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.