[None][test] Fix Mamba hybrid transceiver helper#15323
Conversation
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
📝 WalkthroughWalkthroughThis PR updates the KV-cache transceiver tests to use ChangesHybrid Cache Manager Fixture Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/unittest/others/test_kv_cache_transceiver.py (1)
452-479: 🎯 Functional Correctness | 🔴 CriticalFix invalid
is_disaggkwarg passed toMixedMambaHybridCacheManager
tests/unittest/others/test_kv_cache_transceiver.pypassesis_disagg=True, buttensorrt_llm/_torch/pyexecutor/mamba_cache_manager.py’sMixedMambaHybridCacheManager.__init__has nois_disaggparameter, causing aTypeError: unexpected keyword argument 'is_disagg'.🤖 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/others/test_kv_cache_transceiver.py` around lines 452 - 479, The test passes an unsupported kwarg is_disagg=True to MixedMambaHybridCacheManager which causes a TypeError; open MixedMambaHybridCacheManager.__init__ and either remove the is_disagg argument from the instantiation in test_kv_cache_transceiver.py or replace it with the correct parameter name used in MixedMambaHybridCacheManager.__init__ (verify the constructor signature in mamba_cache_manager and, if the intent is to enable disaggregation, set the corresponding parameter such as enable_disagg/disagg flag that the class actually accepts); ensure the call site (the MixedMambaHybridCacheManager(...) block) matches the constructor parameters (KvCacheConfig, kv_cache_type, num_layers, etc.).
🤖 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.
Outside diff comments:
In `@tests/unittest/others/test_kv_cache_transceiver.py`:
- Around line 452-479: The test passes an unsupported kwarg is_disagg=True to
MixedMambaHybridCacheManager which causes a TypeError; open
MixedMambaHybridCacheManager.__init__ and either remove the is_disagg argument
from the instantiation in test_kv_cache_transceiver.py or replace it with the
correct parameter name used in MixedMambaHybridCacheManager.__init__ (verify the
constructor signature in mamba_cache_manager and, if the intent is to enable
disaggregation, set the corresponding parameter such as enable_disagg/disagg
flag that the class actually accepts); ensure the call site (the
MixedMambaHybridCacheManager(...) block) matches the constructor parameters
(KvCacheConfig, kv_cache_type, num_layers, etc.).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: fdb4c575-9a18-415a-b502-3ceeb8bdee63
📒 Files selected for processing (1)
tests/unittest/others/test_kv_cache_transceiver.py
|
/bot run --disable-fail-fast |
|
PR_Github #53964 [ run ] triggered by Bot. Commit: |
|
PR_Github #53964 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #54142 [ run ] triggered by Bot. Commit: |
|
PR_Github #54142 [ run ] completed with state
|
Summary
MixedMambaHybridCacheManagerinstead of the markerMambaHybridCacheManagerbase class.Root Cause
MambaHybridCacheManagerwas refactored into a marker base class used forisinstancechecks and type hints. The unit-test helper still attempted to call it with constructor arguments, which raisesTypeError: MambaHybridCacheManager() takes no argumentsbefore the hybrid transceiver tests can run. The helper constructs a disaggregated mixed KV+Mamba manager directly, so the matching concrete class isMixedMambaHybridCacheManager.Dependency
This PR is based directly on
mainand does not depend on PR #15181.Validation
python3 -m py_compile tests/unittest/others/test_kv_cache_transceiver.pygit commit -susing Python 3.12.Summary by CodeRabbit