[Refactor][KVConnector]: Move KV Cache Events into KVConnectorWorkerMetadata#34522
[Refactor][KVConnector]: Move KV Cache Events into KVConnectorWorkerMetadata#34522hickeyma wants to merge 2 commits intovllm-project:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request is a well-executed refactoring that moves KV cache event transport to a generic worker-to-scheduler metadata mechanism using KVConnectorWorkerMetadata. This change improves modularity and aligns the KV event transport with a more general pattern, which is a solid architectural improvement. The changes are consistently applied across the codebase, including base classes, LMCacheConnectorV1, MultiConnector, and the corresponding tests have been updated thoroughly. I have one suggestion to improve code clarity in MultiConnector.
|
Ready for review. |
|
This pull request has merge conflicts that must be resolved before it can be |
This change removes kv_cache_events as a top-level field on KVConnectorOutput and instead carries KV cache events inside a connector-specific KVConnectorWorkerMetadata subclass (LMCacheWorkerMetadata). This aligns KV event transport with the generic worker-to-scheduler metadata mechanism introduced in PR vllm-project#31964, eliminating redundant aggregation code paths. Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
095655f to
50bb980
Compare
|
Hi @hickeyma, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
|
Hi @hickeyma, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
Purpose
This change removes
kv_cache_eventsas a top-level field onKVConnectorOutputand instead carries KV cache events inside a connector-specificKVConnectorWorkerMetadatasubclass (LMCacheWorkerMetadata). This aligns KV event transport with the generic worker-to-scheduler metadata mechanism introduced in PR #31964, eliminating redundant aggregation code paths.This also resolves #28309 (review) to request support for KV events for multiple connectors.
Note: Do NOT merge until #31964 merges.Merged, good to go.Test Plan
Test Result
Unit tests pass
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.