prefix state temp fix - write state to both plugin state and cycle state #1509
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.
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR adds back the writing of Prefix State to CycleState.
When switching to use
PluginState
instead ofCycleState
in Prefix plugin, I forgot that PD profile handler in llm-d consumes the prefix state throughCycleState
variable.This PR does a temporary fix to write the state to both
PluginState
andCycleState
and is only meant to solve the issue for llm-d release.once we release, I will work on a long term fix - exposing in
PluginState
the fields that are needed by the plugin extension points, and exposing inCycleState
a different struct, that may be beneficial for other plugins, like sharing the hit percentage per endpoint (which is used by llm-d). This fix will also solve a different problem, where llm-d profile handler needs to access the prefix plugin block hash size in order to calculate the hit percentage (it's not the role of pd handler to calc the prefix hit percentage, it's prefix plugin role).Which issue(s) this PR fixes:
blocker for llm-d release
Does this PR introduce a user-facing change?:
cc: @kfswain @liu-cong