Skip to content

Conversation

@hickeyma
Copy link
Contributor

@hickeyma hickeyma commented Nov 6, 2025

Purpose

Updates to the LMCache connector to enable KV events generated by LMCache to be retrieved and published by the scheduler.

This is part of the solution for:

Note to reviewers: Do NOT merge until the following merge first:

  1. Updated code to use event property instead of the stats property. Property added in [Core] Send kv events from worker side to scheduler side #28309.
  2. [RFC] Add KV events LMCache/LMCache#1846 is merged first.

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Updates to the LMCache connector to enable events generated by LMCache
to be retrieved and published by the scheduler.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
@hickeyma hickeyma marked this pull request as draft November 6, 2025 22:24
@hickeyma hickeyma changed the title [KVConnector] Retrive KV events from LMCache [WIP][KVConnector] Retrive KV events from LMCache Nov 6, 2025
@mergify mergify bot added the kv-connector label Nov 6, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces functionality to retrieve KV events from LMCache by adding a new LMCacheKVEvents class and integrating it into the LMCacheConnectorV1. This is a good step towards better KV-cache interoperability. However, the implementation of LMCacheKVEvents contains several critical bugs in the aggregate, is_empty, and reduce methods that would prevent it from working as intended. My review includes specific code suggestions to fix these issues and ensure the new functionality is robust and correct.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@markmc
Copy link
Member

markmc commented Nov 7, 2025

My initial reaction is that if a connector needs to send events from the worker-side to the scheduler-side, we should add events to KVConnectorOutput and not abuse the generic nature of KVConnectorStats

@hickeyma
Copy link
Contributor Author

hickeyma commented Nov 7, 2025

My initial reaction is that if a connector needs to send events from the worker-side to the scheduler-side, we should add events to KVConnectorOutput and not abuse the generic nature of KVConnectorStats

I agree @markmc, thanks. This is my first effort by piggybacking on the stats. I will push a separate PR which adds events to KVConnectorOutput first and then rebase this accordingly..

This commit follows recommendation from @markmc to use
a specific event property instead of piggybacking on
stats. PR vllm-project#28309 adds the events property to KVConnectorOutput and
this commit picks up the new property and uses it to pass the events
from worker side to scheduler side.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
@hickeyma hickeyma requested a review from markmc November 7, 2025 18:00
@hickeyma
Copy link
Contributor Author

hickeyma commented Nov 7, 2025

Thanks @markmc for the review and feedback. Pushed PR #28309 for adding events property to KVConnectorOutput and also updated this PR accordingly.

@mergify
Copy link

mergify bot commented Nov 12, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @hickeyma.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants