Repository navigation
[mem_cache][10/N] refactor: drop the redundant _component suffix in unified_cache/components - #35644
Merged
ispobock merged 8 commits intoSep 13, 2026
Conversation
alphabetc1
requested review from
Ying1123,
hanming-lu,
hnyls2002,
huangtingwei9988,
hzh0425,
ispobock,
merrymercy,
xiezhq-hermann,
yeahdongcn and
yizhang2077
as code owners
August 20, 2026 05:15
This was referenced Aug 20, 2026
…nents Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
alphabetc1
force-pushed
the
refactor/mem-cache-unified-cache-components
branch
from
September 2, 2026 10:47
b8f7466 to
8187719
Compare
ispobock
approved these changes
Sep 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Part of #25371. Mechanical Move.
#32484 moved
unified_cache_components/tounified_cache/components/but kept the_componentsuffix on every file, so the directory now readsunified_cache/components/full_component.py-- the role is stated twice, once by thedirectory and again by every file inside it. The RFC's naming rule is to drop affixes
that do not differentiate (compare
models/qwen.py, notmodels/qwen_model.py); thisfinishes the move that was started.
tree_component.pyis also misnamed: it is not "a tree component" but theTreeComponentABC plus the shared enums and helpers every component imports.base.pymatches how
allocator/base.pyandpool_host/base.pyalready name that role.Modifications
git mvfor all four, then the import path updated at every call site. No symbol wasrenamed, no re-export shim added.
Diff surface is exactly: 19 import-path lines, 3 filename string literals in
test_session_unified_radix_cache.py(which asserts on file contents by name), 5 linesin
unified_cache/components/README.md, and isort reordering wherebasenow sortsahead of its siblings. Nothing else.
Accuracy Test
Mechanical move, so the bar is byte-level equality rather than accuracy:
base.pyis byte-identical totree_component.py.full.py/mamba.py/swa.pydiffer from their originals in exactly one lineeach -- the
tree_component->baseimport.Verified on an H200 devbox (
PYTHONPATHshadowing the image's copy):Identical command over
test_unified_radix_cache_unittest.py,test_tree_core_registry.py,test_mamba_path_state_cap.py,test_mamba_donated_alloc_ratio.py,test_session_unified_radix_cache.pyagainst bothtrees on the same box -- zero delta, so the 1070 skips are pre-existing and none were
introduced here. Package and per-module imports were also smoke-tested.
Benchmark and Profiling Results
Not applicable -- no runtime behavior changes.
Checklist
Independent of the other in-flight #25371 PRs -- touches no file that #35306 or #35638 touch.
🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ❌ Run #34703150536
Latest PR Test (Extra): 🚫 Run #34703150408
Latest PR Test (AMD ROCm 10): ❌ Run #34703150480