[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
Closed
Conversation
…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>
trtllm-agent
requested review from
JunyiXu-nv,
brnguyen2,
mzweilz,
niukuo,
schetlur-nv,
yufeiwu-nv and
zhaoyangwang-nvidia
July 16, 2026 10:40
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe 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. ChangesWorker readiness handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Collaborator
|
Superseded by #16444, which has merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
proxy.MpiPoolSessionto a factory function soisinstance(x, MpiPoolSession)at line 576 gets a function as its second arg and raises TypeError.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.Test plan
Links
Summary by CodeRabbit
Bug Fixes
Tests