Skip to content

Conversation

@teekenl
Copy link
Contributor

@teekenl teekenl commented Aug 23, 2025

Purpose

When going through _validate_truncation_size, realised that we are missing a test case when the truncation size is set to 0. Add a new test case to ensure no prompt tokens are truncated when it is actually 0. It should raises error when input tokens are too long.

Test Plan

Add "test_zero_truncation_size" new test case

Test Result

(Optional) Documentation Update


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.

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 adds a test case for truncate_prompt_tokens with a value of 0, which is a good addition for coverage. However, the new asynchronous test function is missing the necessary @pytest.mark.asyncio decorator, which will prevent it from running correctly. This is a critical issue that needs to be addressed.

@teekenl teekenl force-pushed the add-test-zero-truncation branch from 874bc1c to e59a389 Compare August 23, 2025 02:25
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) August 23, 2025 04:15
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 23, 2025
auto-merge was automatically disabled August 24, 2025 06:22

Head branch was pushed to by a user without write access

@teekenl teekenl force-pushed the add-test-zero-truncation branch from e59a389 to 46d69e5 Compare August 24, 2025 06:22
@jeejeelee jeejeelee merged commit 5e021b4 into vllm-project:main Aug 24, 2025
17 checks passed
johnnynunez pushed a commit to johnnynunez/vllm that referenced this pull request Aug 24, 2025
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
mengxingkongzhouhan pushed a commit to mengxingkongzhouhan/vllm that referenced this pull request Aug 30, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Sep 3, 2025
ekagra-ranjan pushed a commit to ekagra-ranjan/vllm that referenced this pull request Sep 4, 2025
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants