Unverified Commit 752d2e1c authored by Nick Hill's avatar Nick Hill Committed by GitHub
Browse files

[Minor] Fix some random typos in comments (#24009)


Signed-off-by: default avatarNick Hill <nhill@redhat.com>
parent 81eea3d3
...@@ -3290,7 +3290,7 @@ def sha256_cbor_64bit(input) -> int: ...@@ -3290,7 +3290,7 @@ def sha256_cbor_64bit(input) -> int:
return full_hash & ((1 << 64) - 1) return full_hash & ((1 << 64) - 1)
def get_hash_fn_by_name(hash_fn_name: str) -> Callable: def get_hash_fn_by_name(hash_fn_name: str) -> Callable[[Any], int]:
"""Get a hash function by name, or raise an error if """Get a hash function by name, or raise an error if
the function is not found. the function is not found.
Args: Args:
......
...@@ -1207,7 +1207,7 @@ class Scheduler(SchedulerInterface): ...@@ -1207,7 +1207,7 @@ class Scheduler(SchedulerInterface):
# Now that the blocks are ready, actually cache them. # Now that the blocks are ready, actually cache them.
(block_ids, ) = self.kv_cache_manager.get_block_ids(request.request_id) (block_ids, ) = self.kv_cache_manager.get_block_ids(request.request_id)
num_computed_tokens = len(block_ids) * self.block_size num_computed_tokens = len(block_ids) * self.block_size
# Handle the case where num request tokens less then one block. # Handle the case where num request tokens less than one block.
num_computed_tokens = min(num_computed_tokens, request.num_tokens) num_computed_tokens = min(num_computed_tokens, request.num_tokens)
if num_computed_tokens == request.num_tokens: if num_computed_tokens == request.num_tokens:
num_computed_tokens -= 1 num_computed_tokens -= 1
......
...@@ -47,7 +47,7 @@ class SingleTypeKVCacheManager(ABC): ...@@ -47,7 +47,7 @@ class SingleTypeKVCacheManager(ABC):
# {req_id: The number of cached blocks for this given request} # {req_id: The number of cached blocks for this given request}
# This is used to track the number of cached blocks for each request. # This is used to track the number of cached blocks for each request.
# This is only used to track the RUNNING requests, we do not track the # This is only used to track the RUNNING requests, we do not track the
# data for reempted ones. # data for preempted ones.
self.num_cached_block: dict[str, int] = {} self.num_cached_block: dict[str, int] = {}
self.kv_cache_group_id = kv_cache_group_id self.kv_cache_group_id = kv_cache_group_id
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment