[https://nvbugs/6463812][fix] Import MpiPoolSession from its source module (tensorrt_llm.llmapi.mpi_session)…#16496
Conversation
…est session-reuse monkey-patch The BART TP=2 CUDA-graph proxy setup failed with: TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union tests/test_common/session_reuse.py rebinds tensorrt_llm.executor.proxy.MpiPoolSession to a factory function so the test suite can intercept pool construction for reuse. Once patched, the module-level name is a callable, not a class, and the isinstance(self.mpi_session, MpiPoolSession) check in _start_executor_workers raises TypeError. Import the concrete class directly from tensorrt_llm.llmapi.mpi_session inside the check site so isinstance always receives the real type, while leaving the module-level import untouched (the constructor call is what the session-reuse harness intentionally intercepts). Remove the corresponding waiver. Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
|
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 re-imports ChangesMPI session startup and BART integration coverage
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 |
|
Heads up: this is one of three competing fixes for the same one-line session check in |
|
Closing as it's superseded by #16444 |
Summary
Test plan
Links
Summary by CodeRabbit
Bug Fixes
Tests