Skip to content

[https://nvbugs/6463819][fix] Replace the concrete-type guard with the polymorphic base-class predicate `not…#16494

Closed
trtllm-agent wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6463819
Closed

[https://nvbugs/6463819][fix] Replace the concrete-type guard with the polymorphic base-class predicate `not…#16494
trtllm-agent wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6463819

Conversation

@trtllm-agent

@trtllm-agent trtllm-agent commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: tests/test_common/session_reuse.py rebinds proxy.MpiPoolSession to a factory function so isinstance(x, MpiPoolSession) at line 576 gets a function as its second arg and raises TypeError.
  • Fix: Replace the concrete-type guard with the polymorphic base-class predicate not self.mpi_session.is_comm_session() — same semantics (pool sessions register PIDs; comm sessions skip), works through the wrapper, and no debug/TODO markers introduced.
  • Automated fix generated by repair-bot

Test plan

  • Verify fix on the same GPU type as the original failure
  • Check for regressions in related tests

Links

Summary by CodeRabbit

  • Bug Fixes

    • Improved worker readiness detection across supported session types, helping processes register correctly for monitoring.
  • Tests

    • Re-enabled an end-to-end beam search test that was previously waived.

…proxy

The concrete-type guard `isinstance(self.mpi_session, MpiPoolSession)` in
GenerationExecutorProxy._start_executor_workers raises TypeError when the
test-suite session-reuse infrastructure rebinds
tensorrt_llm.executor.proxy.MpiPoolSession to a factory function and hands
out _ReusableSession wrappers (not subclasses). Replace with the polymorphic
predicate `not self.mpi_session.is_comm_session()` already defined on
MpiSession; it delegates through the wrapper's __getattr__, and preserves
the original semantics (pool sessions register worker PIDs; comm sessions
skip).

Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 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: 0671e9be-d997-48e0-8b98-bad67d1278eb

📥 Commits

Reviewing files that changed from the base of the PR and between 4277d15 and c48e03f.

📒 Files selected for processing (2)
  • tensorrt_llm/executor/proxy.py
  • tests/integration/test_lists/waives.txt
💤 Files with no reviewable changes (1)
  • tests/integration/test_lists/waives.txt

📝 Walkthrough

Walkthrough

The executor proxy now uses a session-type predicate when parsing worker readiness, while retaining the three-element status requirement. The related beam-search integration test waiver was removed.

Changes

Worker readiness handling

Layer / File(s) Summary
Session predicate and integration coverage
tensorrt_llm/executor/proxy.py, tests/integration/test_lists/waives.txt
Worker identity extraction now applies to non-communication sessions with three-element status data, and the corresponding beam-search test is no longer waived.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: dpitman-nvda

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main fix and includes the NVBugs ID and fix type.
Description check ✅ Passed The description explains the bug, fix, and test plan, though it uses custom headings instead of the template's exact sections.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@brnguyen2

Copy link
Copy Markdown
Collaborator

Superseded by #16444, which has merged.

@brnguyen2 brnguyen2 closed this Jul 16, 2026
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.

3 participants