[https://nvbugs/5800725][fix] Always construct AutoProcessor and assign it to self.text_processor; keep Mistra#14072
Conversation
…only path MistralCommonImageProcessor.__call__ requires an images positional argument and always applies apply_chat_template, so text-only inputs (e.g. MMLU/GSM8K prompts) raised TypeError before any inference could run. Construct AutoProcessor unconditionally and use it as text_processor for mistral_large_3, matching the intent documented in the adjacent comment. Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
📝 WalkthroughWalkthrough
ChangesProcessor Initialization Logic
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tensorrt_llm/_torch/models/modeling_mistral.py (1)
1-1:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd/update the NVIDIA copyright header for this modified source file.
This file is modified in the PR but currently has no NVIDIA copyright header at the top.
As per coding guidelines: "All TensorRT-LLM source files (.cpp, .h, .cu, .py) must contain an NVIDIA copyright header with the year of latest meaningful modification."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tensorrt_llm/_torch/models/modeling_mistral.py` at line 1, Add an NVIDIA copyright header at the very top of the modified Python source file modeling_mistral.py indicating the year of the latest meaningful modification; insert the standard multi-line NVIDIA header (matching other TensorRT-LLM source files) including the correct year and copyright line before any imports (e.g., before the existing "import copy"), and ensure the header format matches project guidelines for .py files.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@tensorrt_llm/_torch/models/modeling_mistral.py`:
- Line 1: Add an NVIDIA copyright header at the very top of the modified Python
source file modeling_mistral.py indicating the year of the latest meaningful
modification; insert the standard multi-line NVIDIA header (matching other
TensorRT-LLM source files) including the correct year and copyright line before
any imports (e.g., before the existing "import copy"), and ensure the header
format matches project guidelines for .py files.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: be0aa801-e18b-4aed-833e-a33ac6a51f44
📒 Files selected for processing (1)
tensorrt_llm/_torch/models/modeling_mistral.py
|
/bot run --only-multi-gpu-test --stage-list "GB200-4_GPUs-PyTorch-Post-Merge-1" |
|
PR_Github #48147 [ run ] triggered by Bot. Commit: |
|
PR_Github #48147 [ run ] completed with state |
|
/bot run --only-multi-gpu-test |
|
PR_Github #48259 [ run ] triggered by Bot. Commit: |
|
PR_Github #48259 [ run ] completed with state
|
|
/bot run |
|
PR_Github #48477 [ run ] triggered by Bot. Commit: |
|
PR_Github #48477 [ run ] completed with state |
|
/bot run |
|
PR_Github #50296 [ run ] triggered by Bot. Commit: |
|
PR_Github #50296 [ run ] completed with state |
Summary
imagesarg.Test plan
Links
Summary by CodeRabbit