Skip to content

[TRTLLM-12982][chore] improve multi-item scoring request validation#15627

Open
ixlmar wants to merge 2 commits into
NVIDIA:mainfrom
ixlmar:chore/multi-item-polishing
Open

[TRTLLM-12982][chore] improve multi-item scoring request validation#15627
ixlmar wants to merge 2 commits into
NVIDIA:mainfrom
ixlmar:chore/multi-item-polishing

Conversation

@ixlmar

@ixlmar ixlmar commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Description

Follow-up on review comments from #15416

Test Coverage

n/a

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)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • 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.

Summary by CodeRabbit

  • Bug Fixes
    • Added stricter validation for multi-item input lengths to catch invalid requests earlier.
    • Improved consistency checks in encoder-only workflows to prevent mismatched input lengths.
    • Refined internal position calculations for more reliable handling of multi-part inputs.

Signed-off-by: ixlmar <206748156+ixlmar@users.noreply.github.com>
@ixlmar

ixlmar commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@ixlmar ixlmar requested review from Funatiq, brb-nv and pcastonguay June 25, 2026 12:32
@ixlmar ixlmar marked this pull request as ready for review June 25, 2026 12:36
@ixlmar ixlmar requested review from a team as code owners June 25, 2026 12:36
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #55779 [ run ] triggered by Bot. Commit: e7e04be Link to invocation

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: add66125-58c4-4a1d-a2a7-e699d7fa92de

📥 Commits

Reviewing files that changed from the base of the PR and between a8f0efc and e7e04be.

📒 Files selected for processing (2)
  • tensorrt_llm/_torch/attention_backend/flashinfer.py
  • tensorrt_llm/llmapi/llm.py

📝 Walkthrough

Walkthrough

Adds minimum-length validation for multi_item_part_lens in LLM.encode and _process_multi_item_part_lens, and rewrites flashinfer range_ends construction to use zip(..., strict=True) with chain().

Changes

Multi-item part_lens validation

Layer / File(s) Summary
Encoder validation
tensorrt_llm/llmapi/llm.py
LLM.encode now raises ValueError when multi_item_part_lens has fewer than two elements before the existing prompt-token length consistency check.
Flashinfer pointer construction
tensorrt_llm/_torch/attention_backend/flashinfer.py
_process_multi_item_part_lens tightens short-input validation, adds chain, and rewrites range_ends construction with zip(..., strict=True) and a computed final delimiter.

Review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • NVIDIA/TensorRT-LLM#15413: Also changes multi_item_part_lens validation and multi-item preprocessing in tensorrt_llm/_torch/attention_backend/flashinfer.py.

Suggested reviewers

  • hchings
  • Funatiq
  • litaotju
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is mostly a placeholder and does not explain the issue or the solution beyond referencing review comments. Add a short summary of what changed and why, plus any relevant validation or test details beyond "n/a".
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific, concise, and matches the main change: tighter validation for multi-item scoring requests.
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

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

@ixlmar

ixlmar commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #55800 [ run ] triggered by Bot. Commit: e7e04be Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #55779 [ run ] completed with state ABORTED. Commit: e7e04be

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #55800 [ run ] completed with state SUCCESS. Commit: e7e04be
/LLM/main/L0_MergeRequest_PR pipeline #44695 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

@ixlmar

ixlmar commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #55875 [ run ] triggered by Bot. Commit: 63d0952 Link to invocation

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.

4 participants