[https://nvbugs/6426847][fix] Invert the check to `not isinstance(self.mpi_session, (MpiCommSession… - #16417
[https://nvbugs/6426847][fix] Invert the check to `not isinstance(self.mpi_session, (MpiCommSession…#16417trtllm-agent wants to merge 3 commits into
Conversation
|
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 (1)
📝 WalkthroughWalkthroughThe executor worker startup logic now extracts and registers worker process identities for any three-element initialization status unless the MPI session is a communication session or remote communication client. ChangesWorker identity registration
Estimated code review effort: 2 (Simple) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/bot run |
|
PR_Github #59436 [ run ] triggered by Bot. Commit: |
…patch The session-reuse test infrastructure (tests/test_common/session_reuse.py) monkey-patches MpiPoolSession in tensorrt_llm.executor.proxy with a factory function to enable pool reuse across LLM instances. This broke isinstance(self.mpi_session, MpiPoolSession) in _start_executor_workers with TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union. Switch to a negative check against the never-patched MpiCommSession / RemoteMpiCommSessionClient types, matching the pattern already used earlier in the same function. Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
Head branch was pushed to by a user without write access
87aec0e to
333a4fb
Compare
|
PR_Github #59436 [ run ] completed with state
|
|
FYI I am preparing PR#16444 as the fix and test unwaiving. |
|
Heads up: this is one of three competing fixes for the same one-line session check in |
|
Superseded by #16444, which has merged. |
Summary
session_reusetest hook monkey-patchesMpiPoolSessionintensorrt_llm.executor.proxywith a factory function, soisinstance(self.mpi_session, MpiPoolSession)raisesTypeError: isinstance() arg 2 must be a typebecause the second arg is a function.not isinstance(self.mpi_session, (MpiCommSession, RemoteMpiCommSessionClient))— those two types are never monkey-patched and their absence uniquely identifies the local pool-session case (same fix pattern used earlier in the same function).Test plan
Links
Summary by CodeRabbit