Skip to content

Commit e049130

Browse files
authored
Fix BGE-M3 ruff ISC004 lint (#371)
## Summary Fix Ruff ISC004 lint error in `tests/e2e_tests/serving/test_bge_m3.py`. The string literals in `SENTENCES_2` were implicitly concatenated inside a list. This wraps each concatenated sentence in parentheses to make the intent explicit. ## Test - Not run locally: `ruff` is not installed in my local environment.
1 parent e6ace3f commit e049130

8 files changed

Lines changed: 24 additions & 45 deletions

File tree

.github/configs/ascend.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,8 @@ platform: ascend
77
ci_image: harbor.baai.ac.cn/flagscale/vllm-plugin-fl:v0.1.0-ascend-ci
88

99
# Runner labels for this hardware
10-
# runner_labels:
11-
# - self-hosted
12-
# - Linux
13-
# - ARM64
14-
# - ascend
15-
# - npu-16
16-
17-
# Runner labels for this hardware (platform-hosted)
1810
runner_labels:
19-
- ci-vllm-plugin-fl-ascend
11+
- flagcicd-910c
2012

2113
# Container volumes (hardware-specific paths)
2214
container_volumes:

.github/configs/cuda.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ platform: cuda
77
ci_image: harbor.baai.ac.cn/flagscale/vllm-plugin-fl:v0.1.0-cuda-ci
88

99
# Runner labels for this hardware (self-hosted)
10-
# runner_labels:
11-
# - self-hosted
12-
# - Linux
13-
# - X64
14-
# - nvidia
15-
# - gpu-8
10+
runner_labels:
11+
- self-hosted
12+
- Linux
13+
- X64
14+
- nvidia
15+
- gpu-8
16+
- cuda130
1617

1718
# Runner labels for this hardware (Platform hosted)
18-
runner_labels:
19-
- ci-vllm-plugin-fl
19+
# runner_labels:
20+
# - ci-vllm-plugin-fl
2021

2122
# Container volumes (hardware-specific paths)
2223
container_volumes:

.github/configs/hygon.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ ci_image: harbor.baai.ac.cn/flagos-dev/vllm-plugin-fl:v0.1.0-hygon-ci
88

99
# Runner labels for this hardware (self-hosted)
1010
runner_labels:
11-
- self-hosted
12-
- Linux
13-
- X64
14-
- hygon
15-
- dcu-8
11+
- hg-cicd-vllm-plugin
1612

1713
# Runner labels for this hardware (Platform hosted)
1814
# runner_labels:

.github/configs/maca.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,8 @@ platform: maca
77
ci_image: harbor.baai.ac.cn/flagscale/vllm-plugin-fl:v0.1.0-maca-ci
88

99
# Runner labels for this hardware
10-
# runner_labels:
11-
# - self-hosted
12-
# - Linux
13-
# - X64
14-
# - metax
15-
# - gpu-8
16-
17-
# Runner labels for this hardware (platform-hosted)
1810
runner_labels:
19-
- ci-vllm-plugin-fl-maca
11+
- metax-c550-124
2012

2113
# Container volumes (hardware-specific paths)
2214
container_volumes:

.github/configs/musa.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,8 @@ platform: musa
77
ci_image: harbor.baai.ac.cn/flagscale/vllm-plugin-fl:v0.1.0-musa-ci
88

99
# Runner labels for this hardware
10-
# runner_labels:
11-
# - self-hosted
12-
# - Linux
13-
# - X64
14-
# - mthreads
15-
# - gpu-8
16-
17-
# Runner labels for this hardware (platform-hosted)
1810
runner_labels:
19-
- ci-vllm-plugin-fl-musa
11+
- mt-cicd-vllm-plugin
2012

2113
# Container volumes (hardware-specific paths)
2214
container_volumes:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ import torch
134134
from vllm.config.compilation import CompilationConfig
135135
136136
137-
if __name__ == '__main__':
137+
if __name__ == "__main__":
138138
prompts = [
139139
"Hello, my name is",
140140
]

tests/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ Unit tests should be fast, isolated, and not require GPU or model weights. Use t
303303
import pytest
304304
import torch
305305
306+
306307
class TestMyOp:
307308
def test_basic(self, device):
308309
"""The `device` fixture returns cuda:0 or npu:0 automatically."""
@@ -322,6 +323,7 @@ import torch
322323

323324
pytestmark = pytest.mark.gpu
324325

326+
325327
def test_my_kernel(device):
326328
x = torch.randn(16, 256, device=device)
327329
result = my_kernel(x)

tests/e2e_tests/serving/test_bge_m3.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@
1717

1818
SENTENCES_1 = ["What is BGE M3?", "Defination of BM25"]
1919
SENTENCES_2 = [
20-
"BGE M3 is an embedding model supporting dense retrieval, "
21-
"lexical matching and multi-vector interaction.",
22-
"BM25 is a bag-of-words retrieval function that ranks a set "
23-
"of documents based on the query terms appearing in each document",
20+
(
21+
"BGE M3 is an embedding model supporting dense retrieval, "
22+
"lexical matching and multi-vector interaction."
23+
),
24+
(
25+
"BM25 is a bag-of-words retrieval function that ranks a set "
26+
"of documents based on the query terms appearing in each document"
27+
),
2428
]
2529

2630
SIMILARITY_REFERENCE = [[0.6265, 0.3477], [0.3499, 0.678]]

0 commit comments

Comments
 (0)