Fix for prefix cache hit rate overcounting #1030
Open
ktuvw wants to merge 1 commit into
Open
Conversation
…during scheduling Signed-off-by: Kevin Tu <ktu@ibm.com>
|
👋 Hi! Thank you for contributing. We also recommend installing prek and configuring it to check your code before every local commit. |
joerunde
approved these changes
Jul 15, 2026
joerunde
left a comment
Collaborator
There was a problem hiding this comment.
lpgtm!
Would be nice to update the metrics test to also assert that the metrics are within theoretical limits if you have a minute to do that
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix for prefix cache hit rate overcounting when checking constraints during scheduling
Description
When batching requests, _satisfies_constraints() is called for each request to check if it can be scheduled. Each call to get_computed_blocks() records prefix cache hits as a side effect (when log_stats=True) so prefix cache hit rate when batching is inflated
PR fixes this issue by disabling logging prefix cache hits in _satisfies_constraints() when calling get_computed_blocks()
Related Issues
#1928
Test Plan
Tested on Mistral so far. (8 identical requests, 17k input, 1k output)
Checklist
bash format.sh)Signed-off-by:line (DCO compliance)