[https://nvbugs/6435642][fix] handle session reuse worker registration#16444
Conversation
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
aae7dc6 to
a9d549c
Compare
|
/bot run --disable-fail-fast --stage-list "A30-PyTorch-1, A30-PyTorch-2, GB10-PyTorch-1, RTXPro6000D-PyTorch-1" |
|
PR_Github #59488 [ run ] triggered by Bot. Commit: |
|
PR_Github #59488 [ run ] completed with state |
|
/bot run --disable-fail-fast |
📝 WalkthroughWalkthrough
ChangesSession-Reuse Worker Registration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
tensorrt_llm/executor/proxy.py (1)
578-589: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winApply precise Python annotations across the new code.
tensorrt_llm/executor/proxy.py#L578-L589: replace baretuple/List[...]with a precise ready-status tuple alias using built-in generics.tests/unittest/executor/test_proxy_fast_death.py#L102-L102: add-> Noneto the new test.As per coding guidelines, Python functions require precise annotations and built-in generic types are preferred.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tensorrt_llm/executor/proxy.py` around lines 578 - 589, Update tensorrt_llm/executor/proxy.py lines 578-589 in _register_worker_processes to use the precise ready-status tuple alias with built-in generic syntax instead of bare tuple and List[...] types. Update tests/unittest/executor/test_proxy_fast_death.py line 102 to add a -> None return annotation to the new test.Source: Coding guidelines
tests/unittest/executor/test_proxy_fast_death.py (1)
102-113: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover the excluded session types.
This test verifies only the factory-registration path. Add or confirm tests in
tests/unittest/executor/test_proxy_fast_death.pyfor bothMpiCommSessionandRemoteMpiCommSessionClient, asserting thatregister()is not called; otherwise an incorrect classification would still pass.As per path instructions, coverage is insufficient for the changed classification and needs follow-up.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/unittest/executor/test_proxy_fast_death.py` around lines 102 - 113, Extend test_register_worker_processes_with_session_reuse_factory or add focused tests in the same test module for MpiCommSession and RemoteMpiCommSessionClient. For each session type, configure the bare proxy with that session, invoke _register_worker_processes, and assert _worker_process_monitor.register was not called, while preserving the existing factory-registration assertion.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tensorrt_llm/executor/proxy.py`:
- Around line 578-589: Update tensorrt_llm/executor/proxy.py lines 578-589 in
_register_worker_processes to use the precise ready-status tuple alias with
built-in generic syntax instead of bare tuple and List[...] types. Update
tests/unittest/executor/test_proxy_fast_death.py line 102 to add a -> None
return annotation to the new test.
In `@tests/unittest/executor/test_proxy_fast_death.py`:
- Around line 102-113: Extend
test_register_worker_processes_with_session_reuse_factory or add focused tests
in the same test module for MpiCommSession and RemoteMpiCommSessionClient. For
each session type, configure the bare proxy with that session, invoke
_register_worker_processes, and assert _worker_process_monitor.register was not
called, while preserving the existing factory-registration assertion.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 264bad9a-d9c0-4620-9ee6-a66428a8233f
📒 Files selected for processing (3)
tensorrt_llm/executor/proxy.pytests/integration/test_lists/waives.txttests/unittest/executor/test_proxy_fast_death.py
💤 Files with no reviewable changes (1)
- tests/integration/test_lists/waives.txt
|
PR_Github #59523 [ run ] triggered by Bot. Commit: |
|
PR_Github #59523 [ run ] completed with state
|
|
/bot run |
|
PR_Github #59683 [ run ] triggered by Bot. Commit: |
|
PR_Github #59683 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #59696 [ run ] triggered by Bot. Commit: |
BowenFu
left a comment
There was a problem hiding this comment.
LGTM — proper fix for MPI session-reuse worker registration: the exclusion-check (not comm/remote session) matches the init classification and avoids dereferencing the swapped MpiPoolSession symbol; len==3 guard preserved.
|
/bot skip --comment "failed test already waived, shall be fixed later" |
|
PR_Github #59699 [ skip ] triggered by Bot. Commit: |
|
PR_Github #59696 [ run ] completed with state |
|
PR_Github #59699 [ skip ] completed with state |
NVIDIA#16444) Signed-off-by: Balaram Buddharaju <169953907+brb-nv@users.noreply.github.com>
@coderabbitai summary
Description
PR #16338 added MPI worker-process monitoring for NVBug 6435642, but its startup path used
isinstance(self.mpi_session, MpiPoolSession). The repository-wide session-reuse test hook replaces the module-localMpiPoolSessionclass reference with a factory function, causingisinstance()to raiseTypeErrorunder import-order-dependent test execution.Identify locally spawned pool sessions by excluding
MpiCommSessionandRemoteMpiCommSessionClient, matching the existing session classification used earlier inGenerationExecutorProxy. Extract worker identity registration into a small helper and add deterministic regression coverage that explicitly replacesproxy.MpiPoolSessionwith a factory before exercising the production registration logic.Remove the two out-of-tree test waivers introduced by #16423 so CI executes the affected session-reuse coverage. This supersedes the bot-owned fix in #16417 and reverses the temporary containment introduced by #16423. The unrelated DeepSeekV3Lite waiver remains unchanged.
Related work:
Test Coverage
Targeted CI passed on current commit
a9d549c1f4be02fbbd9090a8535dc1bf806e05d6:/bot run --disable-fail-fast --stage-list "A30-PyTorch-1, A30-PyTorch-2, GB10-PyTorch-1, RTXPro6000D-PyTorch-1"The newly unwaived tests were collected and passed with no skip reason:
A30-PyTorch-2)unittest/_torch/modeling -k "modeling_out_of_tree"TestOutOfTree::test_llm_api[True]Local validation:
git diff --checkpassed.Remaining verification:
/bot run --disable-fail-fasthas been requested on the same commit and is awaiting bot acknowledgement/results.PR Checklist