[TRTLLM-11318][feat] move VisualGen APIs to a separate dir#12538
Conversation
|
/bot run |
📝 WalkthroughWalkthroughThis pull request relocates the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tensorrt_llm/__init__.py`:
- Line 136: The file header year was not updated when this file was modified;
open the module that exports VisualGen and VisualGenParams (the top of
tensorrt_llm/__init__.py where VisualGen, VisualGenParams are imported) and
update the copyright header year range (replace 2024 with the current year) to
reflect the modification year.
In `@tensorrt_llm/serve/openai_server.py`:
- Line 40: Replace direct class/function imports with module-level imports and
update all usages to reference the module namespace: change "from
tensorrt_llm.llmapi import MultimodalEncoder, tracing" to "import
tensorrt_llm.llmapi as llmapi" and update references to llmapi.MultimodalEncoder
and llmapi.tracing.extract_trace_headers(...); similarly import the visual_gen
module (e.g., "import tensorrt_llm.visual_gen as visual_gen") and replace
VisualGen and VisualGenParams usages with visual_gen.VisualGen and
visual_gen.VisualGenParams so all symbols are accessed through their module
namespaces.
In `@tensorrt_llm/serve/visual_gen_utils.py`:
- Line 12: This file (tensorrt_llm/serve/visual_gen_utils.py) is missing the
required NVIDIA Apache/SPDX header; add the standard NVIDIA Apache 2.0 header
block (including SPDX-License-Identifier: Apache-2.0 and the copyright notice
with the year of the latest meaningful modification) at the top of the file
above the existing imports (e.g., above the line importing VisualGenParams),
ensuring the header format matches other TensorRT-LLM source files.
In `@tensorrt_llm/visual_gen/__init__.py`:
- Line 17: The __all__ export list in __init__.py is not sorted in isort-style
order; update the module-level __all__ to an alphabetically sorted list of the
exported names (VisualGen, VisualGenParams, MediaOutput) so it satisfies Ruff
RUF022 — locate the __all__ declaration in tensorrt_llm.visual_gen.__init__ and
reorder the entries into isort-style alphabetical order.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f025dcb3-6d47-4ad3-850f-cd14ee11a2f6
📒 Files selected for processing (10)
.github/CODEOWNERSdocs/source/models/visual-generation.mdtensorrt_llm/__init__.pytensorrt_llm/bench/benchmark/visual_gen.pytensorrt_llm/llmapi/__init__.pytensorrt_llm/serve/openai_server.pytensorrt_llm/serve/visual_gen_utils.pytensorrt_llm/visual_gen/__init__.pytensorrt_llm/visual_gen/visual_gen.pytests/unittest/_torch/visual_gen/test_visual_gen_args.py
💤 Files with no reviewable changes (1)
- tensorrt_llm/llmapi/init.py
|
PR_Github #40319 [ run ] triggered by Bot. Commit: |
|
PR_Github #40319 [ run ] completed with state
|
28bbad5 to
214c517
Compare
|
/bot run |
|
PR_Github #40948 [ run ] triggered by Bot. Commit: |
|
PR_Github #40948 [ run ] completed with state
|
|
PR_Github #41043 [ run ] completed with state
|
fe79590 to
7c75288
Compare
|
/bot run |
|
PR_Github #41078 [ run ] triggered by Bot. Commit: |
|
PR_Github #41078 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #41129 [ run ] triggered by Bot. Commit: |
|
PR_Github #41129 [ run ] completed with state
|
d10520b to
21f6e38
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #41315 [ run ] triggered by Bot. Commit: |
21f6e38 to
dd55c23
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #41416 [ run ] triggered by Bot. Commit: |
Signed-off-by: Zhenhua Wang <[email protected]>
dd55c23 to
5b0f192
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #41456 [ run ] triggered by Bot. Commit: |
|
PR_Github #41456 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #41537 [ run ] triggered by Bot. Commit: |
|
/bot skip --comment "Failing autodeploy DS and TensorRT backend test is unrelated to this PRs changes" |
|
PR_Github #41540 [ skip ] triggered by Bot. Commit: |
|
PR_Github #41540 [ skip ] completed with state |
) Signed-off-by: Zhenhua Wang <[email protected]>
) Signed-off-by: Zhenhua Wang <[email protected]>
Summary by CodeRabbit
Refactor
tensorrt_llm.visual_gen. Users importing from the top-leveltensorrt_llmpackage are unaffected.Chores
Description
Test Coverage
PR 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.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.