[https://nvbugs/6451425][fix] Replace the class-identity isinstance() with the polymorphic predicate…#16421
Closed
trtllm-agent wants to merge 1 commit into
Closed
[https://nvbugs/6451425][fix] Replace the class-identity isinstance() with the polymorphic predicate…#16421trtllm-agent wants to merge 1 commit into
trtllm-agent wants to merge 1 commit into
Conversation
… rebind The test suite's session-reuse helper (tests/test_common/session_reuse.py) rebinds the module-level MpiPoolSession symbol in tensorrt_llm.executor.proxy to a factory function so cached pools can be handed to subsequent bare LLM(...) tests. Once the symbol is a function object, the isinstance(self.mpi_session, MpiPoolSession) check in _start_executor_workers raises TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union. Switch to the polymorphic predicate self.mpi_session.is_comm_session() already defined on MpiSession. Method resolution goes through the real instance (or the _ReusableSession wrapper's __getattr__ delegation), so this works whether the module symbol is rebound or not, and it is more robust than a class-based check for a state that already has an abstract API on the base class. Also remove the stale waiver for unittest/_torch/speculative/test_eagle3.py::test_llama_eagle3[True-TRTLLM-True-False-True-True-True-False-False-False] now that the fix makes the test pass. Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
trtllm-agent
requested review from
asfiyab-nvidia,
brnguyen2,
dpitman-nvda,
fredricz-20070104,
niukuo,
schetlur-nv and
zhaoyangwang-nvidia
July 15, 2026 10:30
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)
📝 WalkthroughWalkthroughChangesWorker initialization
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Collaborator
|
Please resolve the conflict to get this one merged. |
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
is_comm_session()already defined on MpiSession base class; delegates correctly through the _ReusableSession wrapper and is robust to symbol rebindingTest plan
Links
Summary by CodeRabbit
Bug Fixes
Tests