Skip to content

Comments

[bugfix] fix bugs in vllm_v1_adapter.py and setup.py && format code#5

Merged
linhu-nv merged 2 commits intotaco-project:devfrom
zhuofan1123:zfl/dev
Sep 8, 2025
Merged

[bugfix] fix bugs in vllm_v1_adapter.py and setup.py && format code#5
linhu-nv merged 2 commits intotaco-project:devfrom
zhuofan1123:zfl/dev

Conversation

@zhuofan1123
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses bugs in the FlexKV integration setup and vLLM adapter by fixing path handling and string formatting issues. The changes improve robustness of the build configuration and resolve logging inconsistencies.

  • Fixed path handling in setup.py to use absolute paths for include directories
  • Corrected a mathematical calculation bug in token matching logic
  • Standardized logging messages to remove unnecessary f-string formatting

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
setup.py Uses absolute path for include directories to ensure proper build configuration
flexkv/integration/vllm/vllm_v1_adapter.py Fixes token calculation bug and removes unnecessary f-string formatting from log messages

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

"""
match_start_time = time.perf_counter()
num_tokens_to_get = (cdiv(request.num_prompt_tokens, self.block_size)-1)*self.block_size
num_tokens_to_get = (cdiv(request.num_prompt_tokens+1, self.block_size)-1)*self.block_size
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

[nitpick] The expression request.num_prompt_tokens+1 should have spaces around the + operator for better readability: request.num_prompt_tokens + 1.

Suggested change
num_tokens_to_get = (cdiv(request.num_prompt_tokens+1, self.block_size)-1)*self.block_size
num_tokens_to_get = (cdiv(request.num_prompt_tokens + 1, self.block_size)-1)*self.block_size

Copilot uses AI. Check for mistakes.
@linhu-nv linhu-nv merged commit 5dc9f4f into taco-project:dev Sep 8, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants