@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 8c13820f0b
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

[Bugfix] Fix task field initialization when PYTHONOPTIMIZE is enabled (#23718)

Signed-off-by: cndoit18 <cndoit18@outlook.com>

cndoit18 committed Aug 27, 2025 at 20:42 UTC 8c13820f0b203976eab8e821c102234a73f338cd
1 file changed +3 -2
vllm/worker/pooling_model_runner.py
+3 -2
@@ -199,8 +199,9 @@ class PoolingModelRunner(
199
200 pooling_params = seq_group_metadata.pooling_params
201 assert pooling_params is not None
202 - assert (task := pooling_params.task) is not None, (
203 - "You did not set `task` in the API")
202 +
203 + task = pooling_params.task
204 + assert task is not None, "You did not set `task` in the API"
205
206 model = cast(VllmModelForPooling, self.model)
207 to_update = model.pooler.get_pooling_updates(task)