Skip to content

Commit b8b68b3

Browse files
authored
[CI] Upgrade vLLM to 20250920 (c60e613) and address config break (#3067)
### What this PR does / why we need it? Bump main to vllm-project/vllm@c60e613 - Updated imports in `vllm.config` to `vllm.config.model`(vllm-project/vllm@aed1687) vllm-project/vllm#25252 - Refactored `vllm_ascend/sample/sampler.py` to use string values for `logprobs_mode` instead of the `LogprobsMode` enum, simplifying logprobs mode handling and improving compatibility with recent vLLM changes (vllm-project/vllm@aed1687) vllm-project/vllm#25252 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? CI passed - vLLM version: v0.10.2 - vLLM main: vllm-project/vllm@6d8246a --------- Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
1 parent 12bcbd0 commit b8b68b3

File tree

5 files changed

+32
-14
lines changed

5 files changed

+32
-14
lines changed

.github/workflows/format_pr_body.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
- name: Get vLLM version
3838
run: |
39-
VLLM_COMMIT=6d8246aaffff3ebec84767e373212a7b8da328e2
39+
VLLM_COMMIT=c60e6137f0bf2034853919b3a9d705d7e06b93cf
4040
echo "VLLM_COMMIT=https://github.com/vllm-project/vllm/commit/$VLLM_COMMIT" >> $GITHUB_ENV
4141
4242
- name: Checkout repository

.github/workflows/vllm_ascend_test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
VLLM_USE_MODELSCOPE: True
8383
strategy:
8484
matrix:
85-
vllm_version: [6d8246aaffff3ebec84767e373212a7b8da328e2, v0.10.2]
85+
vllm_version: [c60e6137f0bf2034853919b3a9d705d7e06b93cf, v0.10.2]
8686
steps:
8787
- name: Install packages
8888
run: |
@@ -140,7 +140,7 @@ jobs:
140140
max-parallel: 2
141141
matrix:
142142
os: [linux-aarch64-a2-1]
143-
vllm_version: [6d8246aaffff3ebec84767e373212a7b8da328e2, v0.10.2]
143+
vllm_version: [c60e6137f0bf2034853919b3a9d705d7e06b93cf, v0.10.2]
144144
name: singlecard e2e test - light
145145
runs-on: ${{ matrix.os }}
146146
container:
@@ -206,7 +206,7 @@ jobs:
206206
max-parallel: 2
207207
matrix:
208208
os: [linux-aarch64-a2-2]
209-
vllm_version: [6d8246aaffff3ebec84767e373212a7b8da328e2, v0.10.2]
209+
vllm_version: [c60e6137f0bf2034853919b3a9d705d7e06b93cf, v0.10.2]
210210
name: multicard e2e test - light
211211
runs-on: ${{ matrix.os }}
212212
container:

.github/workflows/vllm_ascend_test_full.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
max-parallel: 2
7373
matrix:
7474
os: [linux-aarch64-a2-1]
75-
vllm_version: [6d8246aaffff3ebec84767e373212a7b8da328e2, v0.10.2]
75+
vllm_version: [c60e6137f0bf2034853919b3a9d705d7e06b93cf, v0.10.2]
7676
name: singlecard e2e test - full
7777
runs-on: ${{ matrix.os }}
7878
container:
@@ -156,7 +156,7 @@ jobs:
156156
max-parallel: 2
157157
matrix:
158158
os: [linux-aarch64-a2-2]
159-
vllm_version: [6d8246aaffff3ebec84767e373212a7b8da328e2, v0.10.2]
159+
vllm_version: [c60e6137f0bf2034853919b3a9d705d7e06b93cf, v0.10.2]
160160
name: multicard e2e test - full
161161
runs-on: ${{ matrix.os }}
162162
container:

tests/e2e/conftest.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@
3232
BatchEncoding, BatchFeature)
3333
from transformers.models.auto.auto_factory import _BaseAutoModelClass
3434
from vllm import LLM, SamplingParams
35-
from vllm.config import TaskOption, _get_and_verify_dtype
35+
36+
from vllm_ascend.utils import vllm_version_is
37+
38+
if vllm_version_is("0.10.2"):
39+
from vllm.config import TaskOption, _get_and_verify_dtype
40+
else:
41+
from vllm.config.model import TaskOption, _get_and_verify_dtype
42+
3643
from vllm.inputs import TextPrompt
3744
from vllm.outputs import RequestOutput
3845
from vllm.transformers_utils.utils import maybe_model_redirect

vllm_ascend/sample/sampler.py

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import torch
22
import torch_npu
3-
from vllm.config import LogprobsMode
43
from vllm.v1.sample.ops.topk_topp_sampler import TopKTopPSampler, random_sample
54
from vllm.v1.sample.sampler import Sampler
65

7-
from vllm_ascend.utils import is_310p
6+
from vllm_ascend.utils import is_310p, vllm_version_is
87

9-
DEFAULT_LOGPROBS_MODE = LogprobsMode.RAW_LOGPROBS
8+
if vllm_version_is("0.10.2"):
9+
from vllm.config import LogprobsMode
10+
DEFAULT_LOGPROBS_MODE = LogprobsMode.RAW_LOGPROBS
11+
else:
12+
DEFAULT_LOGPROBS_MODE = "raw_logprobs"
1013

1114

1215
class AscendSampler(Sampler):
@@ -65,10 +68,18 @@ def forward_native(self, logits, generators, k, p):
6568
"""Override pytorch native implementation to torch_npu"""
6669
logits = self._apply_top_k_top_p(logits, k, p)
6770
logits_to_return = None
68-
if self.logprobs_mode == LogprobsMode.PROCESSED_LOGITS:
69-
logits_to_return = logits
70-
elif self.logprobs_mode == LogprobsMode.PROCESSED_LOGPROBS:
71-
logits_to_return = logits.log_softmax(dim=-1, dtype=torch.float32)
71+
if vllm_version_is("0.10.2"):
72+
if self.logprobs_mode == LogprobsMode.PROCESSED_LOGITS:
73+
logits_to_return = logits
74+
elif self.logprobs_mode == LogprobsMode.PROCESSED_LOGPROBS:
75+
logits_to_return = logits.log_softmax(dim=-1,
76+
dtype=torch.float32)
77+
else:
78+
if self.logprobs_mode == "processed_logits":
79+
logits_to_return = logits
80+
elif self.logprobs_mode == "processed_logprobs":
81+
logits_to_return = logits.log_softmax(dim=-1,
82+
dtype=torch.float32)
7283

7384
probs = logits.softmax(dim=-1, dtype=torch.float32)
7485
return random_sample(probs, generators), logits_to_return

0 commit comments

Comments
 (0)