From 01787ad1cdb5710f3b48551058f4284f479ea62a Mon Sep 17 00:00:00 2001 From: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com> Date: Wed, 15 Jul 2026 03:25:10 -0700 Subject: [PATCH] [nvbugs/6451425][fix] use is_comm_session predicate to survive symbol 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> --- tensorrt_llm/executor/proxy.py | 4 +++- tests/integration/test_lists/waives.txt | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tensorrt_llm/executor/proxy.py b/tensorrt_llm/executor/proxy.py index 11451bad5b67..6118561d534b 100644 --- a/tensorrt_llm/executor/proxy.py +++ b/tensorrt_llm/executor/proxy.py @@ -573,7 +573,9 @@ def mpi_done_callback(future: concurrent.futures.Future): raise RuntimeError( "Executor worker returned error") from ready_signal - if isinstance(self.mpi_session, MpiPoolSession) and len(status) == 3: + # Use the polymorphic predicate: the module-level ``MpiPoolSession`` + # symbol may be rebound to a factory at runtime, breaking ``isinstance``. + if not self.mpi_session.is_comm_session() and len(status) == 3: worker_process_identities: List[WorkerProcessIdentity] = status[2] self._worker_process_monitor.register(worker_process_identities) diff --git a/tests/integration/test_lists/waives.txt b/tests/integration/test_lists/waives.txt index e6fd0e0f0d8b..966a32b3212c 100644 --- a/tests/integration/test_lists/waives.txt +++ b/tests/integration/test_lists/waives.txt @@ -448,7 +448,6 @@ unittest/_torch/ray_orchestrator/multi_gpu/test_llm_update_weights_multi_gpu.py unittest/_torch/ray_orchestrator/multi_gpu/test_llm_update_weights_multi_gpu.py::test_llm_partial_update_weights_nvfp4[auto-Qwen3/Qwen3-8B] SKIP (https://nvbugs/6372690) unittest/_torch/ray_orchestrator/multi_gpu/test_llm_update_weights_multi_gpu.py::test_llm_partial_update_weights_nvfp4[fp8-Qwen3/Qwen3-30B-A3B] SKIP (https://nvbugs/6372690) unittest/_torch/ray_orchestrator/multi_gpu/test_llm_update_weights_multi_gpu.py::test_llm_partial_update_weights_nvfp4[fp8-Qwen3/Qwen3-8B] SKIP (https://nvbugs/6372690) -unittest/_torch/speculative/test_eagle3.py::test_llama_eagle3[True-TRTLLM-True-False-True-True-True-False-False-False] SKIP (https://nvbugs/6451425) unittest/_torch/thop/parallel/test_fp8_rowwise_linear.py::test_fp8_rowwise_linear[dtype1] SKIP (https://nvbugs/6301807) unittest/_torch/thop/serial/test_moe.py::TestMoeFp4::test_no_autotune[use_score_as_input-RoutingDSv3-swiglu-1024-1024-1] SKIP (https://nvbugs/5908070) unittest/_torch/thop/serial/test_moe.py::TestMoeFp4::test_no_autotune[use_score_as_input-RoutingRenormalize_qwen_next-swiglu-1024-1024-150] SKIP (https://nvbugs/5908070)