[Chore] Remove v0 code #2968
Conversation
There was a problem hiding this comment.
Code Review
This pull request primarily involves a significant refactoring of the codebase to move modules from the lmcache.v1 namespace to the top-level lmcache package, along with associated import updates across the project. Additionally, the configuration system in lmcache/config.py has been overhauled to use a more robust, centralized definition approach, and the LMCacheServer in lmcache/server/__main__.py has been updated with improved logging and socket handling. My feedback focuses on ensuring compliance with the project's style guide regarding type hints and code cleanliness.
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 0b41003. Configure here.
7f73d30 to
bd9f161
Compare
|
WoW sorry for late @sammshen, I will take a look more closely at this night. |
bd9f161 to
f2b803b
Compare
Delete legacy v0 modules that are no longer used by the v1 runtime:
- lmcache/server/ (v0 server; v1 server lives at lmcache/v1/server/)
- lmcache/config.py, lmcache/protocol.py (v0 equivalents in lmcache/v1/)
- lmcache/storage_backend/evictor/ (only used by the v0 server)
- lmcache/storage_backend/serde/{fast,safe,torch}_serde.py (v0-only serializers)
- tests/test_protocol.py and the unused lmserver_process fixture in
tests/conftest.py
- pyproject.toml: drop the lmcache_v0_server entry point
- .github/CODEOWNERS: drop the /lmcache/server/ entry
Keep lmcache/storage_backend/serde/cachegen_* and serde.py because they
are still imported by lmcache/v1/storage_backend/naive_serde. Flattening
lmcache/v1/ into lmcache/ (and the remaining cleanup that enables) will
follow in a separate PR.
Signed-off-by: Samuel Shen <slshen@uchciago.edu>
f2b803b to
655d6e0
Compare
maobaolong
left a comment
There was a problem hiding this comment.
Totally agree to remove all of v0 related codes 👍
Move lmcache/v1/* up to lmcache/ and tests/v1/* up to tests/ now that v0 is gone (PR LMCache#2968). Resolves the utils namespace collision by converting lmcache/utils.py into a package and absorbing v1/utils/bloom_filter.py and v1/utils/cache_utils.py. Also folds lmcache/storage_backend/serde/ up to lmcache/serde/. Rewrites all lmcache.v1.* / lmcache/v1/ (and tests.v1.* / tests/v1/) references across code, tests, docs, CI configs, and CODEOWNERS. Signed-off-by: Samuel Shen <slshen@uchciago.edu>
[Chore] Remove v0 code
Delete legacy v0 modules that are no longer used by the v1 runtime:
- lmcache/server/ (v0 server; v1 server lives at lmcache/v1/server/)
- lmcache/config.py, lmcache/protocol.py (v0 equivalents in lmcache/v1/)
- lmcache/storage_backend/evictor/ (only used by the v0 server)
- lmcache/storage_backend/serde/{fast,safe,torch}_serde.py (v0-only serializers)
- tests/test_protocol.py and the unused lmserver_process fixture in
tests/conftest.py
- pyproject.toml: drop the lmcache_v0_server entry point
- .github/CODEOWNERS: drop the /lmcache/server/ entry
Keep lmcache/storage_backend/serde/cachegen_* and serde.py because they
are still imported by lmcache/v1/storage_backend/naive_serde. Flattening
lmcache/v1/ into lmcache/ (and the remaining cleanup that enables) will
follow in a separate PR.
Signed-off-by: Samuel Shen <slshen@uchciago.edu>
Co-authored-by: Samuel Shen <slshen@uchciago.edu>

next task is to flatten v1 code into v0
What this PR does / why we need it:
Special notes for your reviewers:
If applicable:
Note
Medium Risk
Removes legacy modules and an exposed console script, which can break downstream imports or workflows that still rely on the v0 server/protocol/serde APIs.
Overview
Removes legacy v0 code paths, including the old socket-based
lmcache.serverimplementation,lmcache.protocol, and related storage backend helpers (evictors and serde implementations).Updates packaging and tests to drop the v0 entrypoint (
lmcache_v0_server) and associated protocol/server fixtures/tests, and makes small doc/CODEOWNERS adjustments to reflect current v1 metadata types and ownership.Reviewed by Cursor Bugbot for commit 655d6e0. Bugbot is set up for automated code reviews on this repo. Configure here.