Fix PoolingParams.skip_reading_prefix_cache type#29364
Fix PoolingParams.skip_reading_prefix_cache type#29364noooop merged 1 commit intovllm-project:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request addresses a type annotation bug that causes a msgspec.ValidationError. The fix in vllm/pooling_params.py is correct. However, the same bug exists in vllm/sampling_params.py and was missed. I've added a comment with a suggestion to fix this as well to make the change comprehensive.
| @@ -57,7 +57,7 @@ class PoolingParams( | |||
| ## Internal use only | |||
| task: PoolingTask | None = None | |||
| requires_token_ids: bool = False | |||
| skip_reading_prefix_cache: bool = None | |||
| skip_reading_prefix_cache: bool | None = None | |||
There was a problem hiding this comment.
This correctly fixes the type annotation for skip_reading_prefix_cache. However, a similar issue exists in vllm/sampling_params.py on line 257, where skip_reading_prefix_cache: bool = None will also cause a msgspec.ValidationError. To ensure a complete fix, please update the type annotation in SamplingParams as well.
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run You ask your reviewers to trigger select CI tests on top of Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
|
Thanks for this fix.
|
Summary: It's annotated as bool but assigned default value None. This makes msgspec doesn't like it when decoding the request: > msgspec.ValidationError: Expected `bool`, got `None` - at `$[4][10]` ``` (EngineCore_DP0 pid=494675) File "vllm/v1/engine/core.py", line 1024, in process_input_sockets (EngineCore_DP0 pid=494675) request = add_request_decoder.decode(data_frames) (EngineCore_DP0 pid=494675) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=494675) File "vllm/v1/serial_utils.py", line 311, in decode (EngineCore_DP0 pid=494675) return self.decoder.decode(bufs[0]) (EngineCore_DP0 pid=494675) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=494675) msgspec.ValidationError: Expected `bool`, got `None` - at `$[4][10]` ``` Signed-off-by: KFL <kludev@gmail.com>
Signed-off-by: KFL <kludev@gmail.com>
Signed-off-by: KFL <kludev@gmail.com>
Summary:
It's annotated as bool but assigned default value None. This makes
msgspec doesn't like it when decoding the request:
Purpose
Fix PoolingParams.skip_reading_prefix_cache type
Test Plan
Reproducing and validating the fix:
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.