[BugFix]: Fix typo bug#2980
Conversation
There was a problem hiding this comment.
Code Review
This pull request renames the 'hidden_dim_sizes' key to 'hidden_dim_size' in the multiprocess server's status report to ensure compatibility with the CLI. Feedback indicates that a regression test should be added to verify this change and prevent future regressions, as required by the repository's style guide for bug fixes.
| "num_layers": ctx.num_layers, | ||
| "block_size": ctx.block_size, | ||
| "hidden_dim_sizes": str(ctx.hidden_dim_sizes), | ||
| "hidden_dim_size": str(ctx.hidden_dim_sizes), |
There was a problem hiding this comment.
The fix correctly addresses the KeyError by matching the key name expected by the CLI. However, per the repository style guide (line 39), bug fixes should include regression tests. Please add a test case to verify that the report_status output contains the correct hidden_dim_size key to prevent future regressions.
References
- Bug fixes include regression tests (link)
|
thanks for catching this bug! it’s probably better to update the key in the cli describe, hidden_dim_size was changed to hidden_dim_sizes (List[int]) in #2926 to support kv_groups. |
|
@princepride Yeah, you can patch this to this PR. |
Okay, edited. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 88d2e9d. Configure here.
Signed-off-by: princepride <wangzhipeng628@gmail.com>
Align with the rename introduced in LMCache#2926 where hidden_dim_size was changed to hidden_dim_sizes (List[int]) to support kv_groups. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: princepride <wangzhipeng628@gmail.com>
Update test fixture and assertion in test_describe.py to match the hidden_dim_size -> hidden_dim_sizes rename from LMCache#2926. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: princepride <wangzhipeng628@gmail.com>
88d2e9d to
4bf63af
Compare
maobaolong
left a comment
There was a problem hiding this comment.
LGTM @princepride Thanks for this fix.
* fix typo bug Signed-off-by: princepride <wangzhipeng628@gmail.com> * fix: rename hidden_dim_size to hidden_dim_sizes in describe and server Align with the rename introduced in LMCache#2926 where hidden_dim_size was changed to hidden_dim_sizes (List[int]) to support kv_groups. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: princepride <wangzhipeng628@gmail.com> * fix: update test fixture to use hidden_dim_sizes key Update test fixture and assertion in test_describe.py to match the hidden_dim_size -> hidden_dim_sizes rename from LMCache#2926. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: princepride <wangzhipeng628@gmail.com> --------- Signed-off-by: princepride <wangzhipeng628@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix typo bug Signed-off-by: princepride <wangzhipeng628@gmail.com> * fix: rename hidden_dim_size to hidden_dim_sizes in describe and server Align with the rename introduced in LMCache#2926 where hidden_dim_size was changed to hidden_dim_sizes (List[int]) to support kv_groups. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: princepride <wangzhipeng628@gmail.com> * fix: update test fixture to use hidden_dim_sizes key Update test fixture and assertion in test_describe.py to match the hidden_dim_size -> hidden_dim_sizes rename from LMCache#2926. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: princepride <wangzhipeng628@gmail.com> --------- Signed-off-by: princepride <wangzhipeng628@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

What this PR does / why we need it:
I noticed we use
hidden_dim_sizesinstead ofhidden_dim_size, when I run, I got an error:
After this typo fix, you can got the expect result:
BTW, I noticed a lot of
hidden_dim_sizes😂Note
Low Risk
Small CLI-only typo fix with corresponding test updates; minimal impact beyond correcting field extraction and output.
Overview
Fixes a
KeyErrorinlmcache describe kvcacheby changing the per-model KV cache layout field fromhidden_dim_sizeto the correcthidden_dim_sizeskey, sodescribeworks with the service’s/api/statuspayload.Updates the CLI integration test fixture and assertions to expect
hidden_dim_sizesinstead ofhidden_dim_size.Reviewed by Cursor Bugbot for commit 4bf63af. Bugbot is set up for automated code reviews on this repo. Configure here.