Repository navigation
[None][test] Fix the _validate_request fakes in test_forward_error_survival - #20883
Conversation
…rvival The four test_validate_request_* cases call PyExecutor._validate_request with a SimpleNamespace request and an object.__new__ executor shell. _validate_request reads request.kv_cache_retention_config and self._is_kv_manager_v2 before it reaches the multimodal hook, and neither fake defined them, so all four cases raised AttributeError. Give the request kv_cache_retention_config=None and the shell _is_kv_manager_v2 = False, the value __init__ derives from kv_cache_manager=None. Signed-off-by: Michal Guzek <mguzek@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe forward error survival test helpers now initialize ChangesForward Error Survival Test Setup
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Other Merge Risk: ⚪ Minimal · up to
|
|
/bot run --stage-list "CPU-Generic-arm-1" |
|
PR_Github #80103 [ run ] triggered by Bot. Commit: |
|
PR_Github #80103 [ run ] completed with state |
|
Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements. |
|
/bot run |
|
PR_Github #80217 [ run ] triggered by Bot. Commit: |
|
PR_Github #80217 [ run ] completed with state |
Brings in the main-branch fix for tests/unittest/executor/test_forward_error_survival.py (NVIDIA#20883), which the branch point predates and which failed in this PR's first CI run, and follows the rename of tests/unittest/_torch/executor/ to tests/unittest/_torch/pyexecutor/ (NVIDIA#20669) so that test_forced_chunk_context_limit.py stays in the directory the L0 test lists run. Signed-off-by: berryz <berryz@nvidia.com>
Dev Engineer Review
The test fakes now define
kv_cache_retention_config=Noneand_is_kv_manager_v2=False. These values address missing attributes in the request-validation tests. The changes are limited to test setup.QA Engineer Review
The modified unit-test file includes four
test_validate_request_*cases. The author reports that all 21 tests passed with the change and that pre-commit passed. The tests cover request validation, including model-hook acceptance and rejection, text-only requests, and models without the hook. No matching entry was found in the searched integration test lists. Coverage verdict: sufficient.Per-File QA Perspective
tests/unittest/executor/test_forward_error_survival.py: Covers executor forward-error survival and request-validation behavior. This unit-test file was not found in the searchedtest-db/CI orqa/manual-QA lists.Description
The four
test_validate_request_*cases intests/unittest/executor/test_forward_error_survival.py, added in #19465, fail with:PyExecutor._validate_requestreadsrequest.kv_cache_retention_config, thenself._is_kv_manager_v2, before it reaches the multimodal hook these cases exercise. The test's fake request is aSimpleNamespacewithout the first. Its executor shell is built withobject.__new__, so__init__, which sets the second, never runs. The file is inl0_cpu.yml, soCPU-Generic-arm-1fails in every pre-merge run whose tree includes #19465.This gives the fake request
kv_cache_retention_config=Noneand the shell_is_kv_manager_v2 = False, the value__init__derives fromkv_cache_manager=None. Only the test changes.Test Coverage
tests/unittest/executor/test_forward_error_survival.py, run against the CI-built aarch64 wheel of [TRTLLM-17144][feat] Load the Muse Spark Open (muse_spark) config #20643. That wheel is based on6cb5a79980, whose_validate_requestand test file match currentmain. With the file as onmain: 4 failed and 17 passed, the same four cases that fail in CI. With this change: 21 passed.pre-commitpasses on the changed file.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)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.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.