[https://nvbugs/5955173][fix] Add abort method for GenerationResultBase#11970
[https://nvbugs/5955173][fix] Add abort method for GenerationResultBase#11970JunyiXu-nv merged 2 commits intoNVIDIA:mainfrom
Conversation
Signed-off-by: Junyi Xu <219237550+JunyiXu-nv@users.noreply.github.com>
📝 WalkthroughWalkthroughThese changes introduce an abort mechanism for generation results. A new Changes
Sequence DiagramsequenceDiagram
participant PostprocWorker
participant Response as PostprocWorker.Output
participant Handler as _handle_response
participant Result as GenerationResult
PostprocWorker->>Response: Create Output with should_abort
Response->>Handler: Emit output signal
Handler->>Handler: Check response.should_abort
alt should_abort is True
Handler->>Result: Call abort()
Result->>Result: Delegate via super().abort()
Note over Result: Sets _aborted flag in base class
end
Handler->>Result: Store output in results
Result->>Result: aborted() returns True
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/unittest/llmapi/test_executor.py`:
- Around line 337-370: Rename the three test functions to snake_case to match
project conventions: change test_abort_on_GenerationResultBase to
test_abort_on_generation_result_base,
test_abort_on_DetokenizedGenerationResultBase to
test_abort_on_detokenized_generation_result_base, and
test_PostprocWorker_Output_should_abort to
test_postproc_worker_output_should_abort; update any local references or
fixtures that call these function names (if any) and run the test suite to
ensure discovery still works (look for these symbols:
test_abort_on_GenerationResultBase,
test_abort_on_DetokenizedGenerationResultBase,
test_PostprocWorker_Output_should_abort).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b00e8800-123b-4383-9ba4-fd4dfd2826b1
📒 Files selected for processing (3)
tensorrt_llm/executor/postproc_worker.pytensorrt_llm/executor/result.pytests/unittest/llmapi/test_executor.py
|
/bot run |
|
PR_Github #37956 [ run ] triggered by Bot. Commit: |
|
PR_Github #37956 [ run ] completed with state
|
|
/bot run |
|
PR_Github #38175 [ run ] triggered by Bot. Commit: |
|
PR_Github #38175 [ run ] completed with state |
…se (NVIDIA#11970) Signed-off-by: Junyi Xu <219237550+JunyiXu-nv@users.noreply.github.com>
Summary by CodeRabbit
Release Notes
New Features
Tests
Description
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.