Repository navigation
[https://nvbugs/7125734][fix] Read early responses from the response channel - #22698
Conversation
…channel In test_py_executor.py, _first_token_executor creates a ResponseChannel (NVIDIA#21904), but the early-response regression added in NVIDIA#22346 still reads executor.responses. Read the channel's response queue in the seven existing lookups, keeping the assertions and termination checks unchanged. Remove the matching waiver from tests/integration/test_lists/waives.txt. Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
|
No actionable comments were generated in the recent review. WalkthroughThe first-token response test now reads emitted responses from ChangesPyExecutor response test
Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Other Merge Risk:
|
trtllm-agent-review
left a comment
There was a problem hiding this comment.
Thanks for the PR. It points the early first-token response regression test at the executor's ResponseChannel, where delivered responses have lived since #21904, and removes the test's nvbugs/7125734 waiver.
Reviewed at commit d89c7fe9d1 (2 files, +7/−8).
Approve: no Blocker found.
What this review checked
- At the base the test fails with
AttributeError, becausePyExecutorno longer hasresponses. The new lookups read the dict that_gather_and_publish_responsesdelivers into (py_executor.py:13409,request_delivery.py:83-86), and no other test or production code still reads the moved attributes. - All eight assertions and both termination checks are kept. Traced against the head code, they still fail if the iteration-1 response stops being suppressed, a finished request gets an early response, or termination repeats.
- The removed line is the only waive citing nvbugs/7125734, and the test runs pre-merge on the CPU stages through
unittest/_torch/pyexecutorinl0_cpu.yml:118(file-levelcpu_onlymark). - Not covered: The test was not run here; the before/after results in the description were not reproduced.
- Not covered: No pre-merge test pipeline has run on this commit yet.
Automated review by trtllm-agent-review. If a point is wrong, reply in its thread. After you push fixes or reply, the bot re-checks the Blockers within a few hours.
|
/bot run |
Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com> # Conflicts: # tests/integration/test_lists/waives.txt
|
/bot run |
|
PR_Github #86472 [ run ] triggered by Bot. Commit: |
|
PR_Github #86472 [ run ] completed with state |
Description
The
_first_token_executorfixture intests/unittest/_torch/pyexecutor/test_py_executor.pyinitializes aResponseChannelfollowing #21904. The early-response regression added in #22346 still readsexecutor.responses, although the response-delivery path stores results inexecutor._response_channel.responses(tensorrt_llm/_torch/pyexecutor/request_delivery.py).Read the channel's queue in the seven existing response lookups. Keep all eight assertions and the termination checks unchanged, and remove only this case's waiver from
tests/integration/test_lists/waives.txt.Test Coverage
unittest/_torch/pyexecutor/test_py_executor.py::test_early_response_suppresses_repeat_and_leaves_terminal_for_normal_pass.unittest/_torch/pyexecutorintests/integration/test_lists/test-db/l0_cpu.yml.unittest/_torch/pyexecutorentry throughtests/integration/defs/test_unittests.pywith--test-listand--unittest-markexpr=cpu_only, keeping its inner tests together in one pytest process.mainsnapshot1d3b8a7cde9f6af93ff7b80916150a60e47d0732with only this case unwaived: 5,910 passed, 22 skipped, 1 failed. The exact regression raisesAttributeError: 'PyExecutor' object has no attribute 'responses'.ruff checkandruff format --checkpass fortests/unittest/_torch/pyexecutor/test_py_executor.py.Fixes https://nvbugs/7125734
Dev Engineer Review
test_early_response_suppresses_repeat_and_leaves_terminal_for_normal_passnow readexecutor._response_channel.responsesinstead ofexecutor.responses. Assertions and termination checks are unchanged._response_channelattribute. A refactor of that attribute breaks the test.QA Engineer Review
tests/unittest/_torch/pyexecutor/test_py_executor.py(+7/-7).tests/integration/test_lists/waives.txt(one SKIP entry removed).test-db/orqa/was not verified.Per-File QA Perspective
test_py_executor.py: Checks early responses through the response channel. QA should confirm the test passes in CI.waives.txt: Removing the waiver makes the test run in CI. QA should watch for new failures.