Skip to content

[https://nvbugs/6157892] [fix] MistralCommonImageProcessor text-only path#13916

Open
evezhier wants to merge 6 commits into
NVIDIA:mainfrom
evezhier:fix/mistral-processor
Open

[https://nvbugs/6157892] [fix] MistralCommonImageProcessor text-only path#13916
evezhier wants to merge 6 commits into
NVIDIA:mainfrom
evezhier:fix/mistral-processor

Conversation

@evezhier
Copy link
Copy Markdown
Collaborator

@evezhier evezhier commented May 8, 2026

Summary by CodeRabbit

  • New Features
    • Image processor now supports text-only processing mode with images as an optional parameter, allowing flexible usage without requiring image input.

Description

Allows text-only path (images optional)for MistralCommonImageProcessor

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.

@evezhier evezhier requested review from a team as code owners May 8, 2026 19:38
@evezhier evezhier requested review from jdebache and symphonylyh May 8, 2026 19:38
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

📝 Walkthrough

Walkthrough

The MistralCommonImageProcessor.__call__ method signature was modified to make the images parameter optional by assigning a default empty list value. This change allows the processor to be called in text-only mode without requiring an explicit images argument.

Changes

Optional Images Parameter

Layer / File(s) Summary
Method Signature Update
tensorrt_llm/_torch/models/modeling_mistral.py
The images parameter in MistralCommonImageProcessor.__call__ is changed from required to optional with a default value of an empty list, enabling text-only processing mode.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description is minimal and lacks critical details needed for evaluation. While it mentions enabling a text-only path, it provides insufficient context about the issue, solution rationale, and test coverage. Expand the Description section to explain why this change is needed and provide specific test cases or evidence that the text-only path works correctly without breaking existing functionality.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title clearly and specifically describes the main change: enabling a text-only path with optional images for MistralCommonImageProcessor.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

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 win

Add/update NVIDIA copyright header in this modified file.

This file is modified in this PR and currently has no NVIDIA copyright header at the top.

As per coding guidelines: "All C++, Python, and other source files must contain NVIDIA copyright header with current modification year".

🤖 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 or update the
NVIDIA copyright header at the top of
tensorrt_llm/_torch/models/modeling_mistral.py (above the existing "import copy"
statement) so the modified file includes the required NVIDIA copyright header
with the current modification year; insert the standard multi-line header block
as used across the repo, ensuring it appears before any imports or code in the
module.
🤖 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.

Inline comments:
In `@tensorrt_llm/_torch/models/modeling_mistral.py`:
- Line 312: The method MistralCommonImageProcessor.__call__ uses a mutable
default parameter images=[], which can be shared across calls; change the
signature to use images=None and inside the method initialize it with images =
[] if images is None, updating any subsequent references to the parameter
accordingly (ensure no other logic depends on an empty-list default at function
definition time).

---

Outside diff comments:
In `@tensorrt_llm/_torch/models/modeling_mistral.py`:
- Line 1: Add or update the NVIDIA copyright header at the top of
tensorrt_llm/_torch/models/modeling_mistral.py (above the existing "import copy"
statement) so the modified file includes the required NVIDIA copyright header
with the current modification year; insert the standard multi-line header block
as used across the repo, ensuring it appears before any imports or code in the
module.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bc4f39f5-2abf-48cc-803a-c421816541ae

📥 Commits

Reviewing files that changed from the base of the PR and between f8572ab and e209560.

📒 Files selected for processing (1)
  • tensorrt_llm/_torch/models/modeling_mistral.py

Comment thread tensorrt_llm/_torch/models/modeling_mistral.py Outdated
@evezhier
Copy link
Copy Markdown
Collaborator Author

evezhier commented May 9, 2026

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47521 [ run ] triggered by Bot. Commit: e209560 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47521 [ run ] completed with state SUCCESS. Commit: e209560
/LLM/main/L0_MergeRequest_PR pipeline #37438 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@evezhier
Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47615 [ run ] triggered by Bot. Commit: e209560 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47615 [ run ] completed with state SUCCESS. Commit: e209560
/LLM/main/L0_MergeRequest_PR pipeline #37520 completed with status: 'SUCCESS'

CI Report

Link to invocation

@evezhier
Copy link
Copy Markdown
Collaborator Author

/bot run --post-merge

@evezhier
Copy link
Copy Markdown
Collaborator Author

/bot run --extra-stage "L0_Test-SBSA-Multi-GPU"

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47928 [ run ] triggered by Bot. Commit: e209560 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47931 [ run ] triggered by Bot. Commit: e209560 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47931 [ run ] completed with state FAILURE. Commit: e209560
/LLM/main/L0_MergeRequest_PR pipeline #37777 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@evezhier
Copy link
Copy Markdown
Collaborator Author

/bot run --extra-stage "GB200-4_GPUs-PyTorch-Post-Merge-1"

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47938 [ run ] triggered by Bot. Commit: e209560 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47938 [ run ] completed with state SUCCESS. Commit: e209560
/LLM/main/L0_MergeRequest_PR pipeline #37784 completed with status: 'SUCCESS'

CI Report

Link to invocation

evezhier added 2 commits May 12, 2026 05:35
Signed-off-by: Olya Kozlova <okozlova@nvidia.com>
Signed-off-by: Olya Kozlova <okozlova@nvidia.com>
@evezhier evezhier force-pushed the fix/mistral-processor branch from e209560 to 6b2e6ab Compare May 12, 2026 12:38
@evezhier
Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --extra-stage "GB200-4_GPUs-PyTorch-Post-Merge-1"

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47965 [ run ] triggered by Bot. Commit: 6b2e6ab Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47965 [ run ] completed with state SUCCESS. Commit: 6b2e6ab
/LLM/main/L0_MergeRequest_PR pipeline #37805 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@evezhier
Copy link
Copy Markdown
Collaborator Author

/bot run --extra-stage "GB200-4_GPUs-PyTorch-Post-Merge-1"

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #48007 [ run ] triggered by Bot. Commit: 6b2e6ab Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #48007 [ run ] completed with state SUCCESS. Commit: 6b2e6ab
/LLM/main/L0_MergeRequest_PR pipeline #37843 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Signed-off-by: Julien Debache <jdebache@nvidia.com>
@jdebache
Copy link
Copy Markdown
Collaborator

/bot run

1 similar comment
@dcampora
Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #48921 [ run ] triggered by Bot. Commit: 534f647 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #48921 [ run ] completed with state SUCCESS. Commit: 534f647
/LLM/main/L0_MergeRequest_PR pipeline #38671 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@dcampora
Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #49167 [ run ] triggered by Bot. Commit: 55c0783 Link to invocation

@jdebache
Copy link
Copy Markdown
Collaborator

/bot run --extra-stage "GB200-4_GPUs-PyTorch-Post-Merge-1"

1 similar comment
@DomBrown
Copy link
Copy Markdown
Collaborator

/bot run --extra-stage "GB200-4_GPUs-PyTorch-Post-Merge-1"

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #49183 [ run ] triggered by Bot. Commit: 55c0783 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #49183 [ run ] completed with state SUCCESS. Commit: 55c0783
/LLM/main/L0_MergeRequest_PR pipeline #38860 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@jdebache
Copy link
Copy Markdown
Collaborator

/bot run --extra-stage "GB200-4_GPUs-PyTorch-Post-Merge-1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants