-
Notifications
You must be signed in to change notification settings - Fork 434
[Feature] AIBrix KVCache common #1057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- project init - common module - memory module - spec/status/cache handle Signed-off-by: Haiyang Shi <haiyang.shi@bytedance.com>
80c07a0
to
63ade6c
Compare
@@ -0,0 +1,12 @@ | |||
# python | |||
__pycache__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we need a separate package python/aibrix_kvcache/aibrix_kvcache
. corresponding usage would be pip install aibrix-kvcache
another option is python/aibrix/aibrix/kvcache
. kv cache package doesn't have interactions with other components, technically, it can be a standalone one, I think make it as a submodule also works. What's your preferred way? this is related to publish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially considered making kv cache as a submodule. But since kv cache has many more dependencies than the aibrix runtime (e.g., torch, redis, infinistore) and their dependencies do not have too much overlap, I decided to make it as a separate project. Therefore, when user installs aibrix runtime or kv cache, only needed dependencies would be downloaded and installed, which makes more sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR establishes the core framework for the AIBrix KVCache project by introducing foundational modules, test infrastructure, and configuration updates. Key additions include test fixtures and helper functions, core modules for status, spec, memory, and caching functionality, as well as standardized project configuration and CI workflows.
Reviewed Changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
python/aibrix_kvcache/tests/conftest.py | Introduces tests and fixtures for KVCache with helper functions to manage cache environments. |
python/aibrix_kvcache/tests/init.py | Adds license headers to test files. |
python/aibrix_kvcache/scripts/check_aibrix_header.py | Provides a script to verify and add required AIBrix license headers in source files. |
python/aibrix_kvcache/pyproject.toml | Sets up project configuration, dependencies, and linting configurations. |
python/aibrix_kvcache/aibrix_kvcache/status.py | Implements a generic status mechanism for success/error handling. |
python/aibrix_kvcache/aibrix_kvcache/spec.py | Defines specifications for cache blocks and tensor configurations. |
python/aibrix_kvcache/aibrix_kvcache/memory/* | Adds memory management modules including tensor pool allocator and ref-counted objects. |
python/aibrix_kvcache/aibrix_kvcache/common/* | Introduces common utilities such as async base, nvtx profiling, object pool and logging. |
python/aibrix_kvcache/aibrix_kvcache/cache_handle.py | Establishes cache handle abstraction and its memory-region based implementation. |
python/aibrix_kvcache/README.md | Provides an overview and quick start instructions for using the framework. |
python/aibrix_kvcache/LICENSE | Specifies the project license under the Apache License 2.0. |
.github/workflows/*.yml | Updates CI workflows to test and lint changes within the designated subdirectories. |
Files not reviewed (2)
- python/aibrix_kvcache/.gitignore: Language not supported
- python/aibrix_kvcache/scripts/format.sh: Language not supported
Signed-off-by: Haiyang Shi <haiyang.shi@bytedance.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did review the detail code in this PR.
Let's get all the work merged and then kick off the code review in parallel.
@@ -0,0 +1,45 @@ | |||
name: Python AIBrix KVCache Tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check release pipeline, we need to upload to pypi as well for each tags.
@@ -0,0 +1,99 @@ | |||
[project] | |||
name = "aibrix-kvcache" | |||
version = "0.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest version are aligned with aibrix repo tags. we may consider the version strategy here.
- project init - common module - memory module - spec/status/cache handle --------- Signed-off-by: Haiyang Shi <haiyang.shi@bytedance.com> Co-authored-by: Haiyang Shi <haiyang.shi@bytedance.com>
Pull Request Description
This PR introduces the foundational setup and core modules for the project:
Key Changes
Related Issues
Resolves: #[Insert issue number(s)]
Important: Before submitting, please complete the description above and review the checklist below.
Contribution Guidelines (Expand for Details)
We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:
Pull Request Title Format
Your PR title should start with one of these prefixes to indicate the nature of the change:
[Bug]
: Corrections to existing functionality[CI]
: Changes to build process or CI pipeline[Docs]
: Updates or additions to documentation[API]
: Modifications to aibrix's API or interface[CLI]
: Changes or additions to the Command Line Interface[Misc]
: For changes not covered above (use sparingly)Note: For changes spanning multiple categories, use multiple prefixes in order of importance.
Submission Checklist
By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.