Skip to content

Commit ba5ccd1

Browse files
cndoit18amd-xiaoyu12
authored andcommitted
[Bugfix] Fix task field initialization when PYTHONOPTIMIZE is enabled (vllm-project#23718)
Signed-off-by: cndoit18 <cndoit18@outlook.com> Signed-off-by: Xiao Yu <xiao.yu@amd.com>
1 parent b6d11be commit ba5ccd1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vllm/worker/pooling_model_runner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,9 @@ def _prepare_pooling(
199199

200200
pooling_params = seq_group_metadata.pooling_params
201201
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"
204205

205206
model = cast(VllmModelForPooling, self.model)
206207
to_update = model.pooler.get_pooling_updates(task)

0 commit comments

Comments
 (0)