Skip to content

Commit 4d46545

Browse files
committed
fix
1 parent 4bc1d9f commit 4d46545

27 files changed

Lines changed: 166 additions & 173 deletions

.pre-commit-config.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ repos:
1818
rev: v1.7.7
1919
hooks:
2020
- id: actionlint
21+
args: ["-config-file", "actionlint.yaml"]
2122
- repo: https://github.com/pre-commit/mirrors-clang-format
2223
rev: v21.1.2
2324
hooks:
@@ -68,11 +69,6 @@ repos:
6869
entry: tools/mypy.sh 1 "3.13"
6970
<<: *mypy_common
7071
stages: [manual] # Only run in CI
71-
- id: shellcheck
72-
name: Lint shell scripts
73-
entry: tools/pre_commit/shellcheck.sh
74-
language: script
75-
types: [shell]
7672
- id: signoff-commit
7773
name: Sign-off Commit
7874
entry: bash

actionlint.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
self-hosted-runner:
2+
labels:
3+
- rbln-sw-k8s-general
4+
- rbln-sw-k8s-ca22-1
5+
- rbln-sw-k8s-ca22-4
6+
- fsw-r18s-atom-ext-rbln-sw-general-c1m12
7+
- fsw-r18s-atom-ext-rbln-sw-general-c3m48a1

benchmarks/benchmark_serving.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,32 +1125,37 @@ def main(args: argparse.Namespace):
11251125
"--custom-output-len",
11261126
type=int,
11271127
default=256,
1128-
help="Number of output tokens per request, used only for custom dataset.",
1128+
help="Number of output tokens per request, "
1129+
"used only for custom dataset.",
11291130
)
11301131
custom_group.add_argument(
11311132
"--custom-skip-chat-template",
11321133
action="store_true",
1133-
help="Skip applying chat template to prompt, used only for custom dataset.",
1134+
help="Skip applying chat template to prompt, "
1135+
"used only for custom dataset.",
11341136
)
11351137

11361138
sonnet_group = parser.add_argument_group("sonnet dataset options")
11371139
sonnet_group.add_argument(
11381140
"--sonnet-input-len",
11391141
type=int,
11401142
default=550,
1141-
help="Number of input tokens per request, used only for sonnet dataset.",
1143+
help="Number of input tokens per request, "
1144+
"used only for sonnet dataset.",
11421145
)
11431146
sonnet_group.add_argument(
11441147
"--sonnet-output-len",
11451148
type=int,
11461149
default=150,
1147-
help="Number of output tokens per request, used only for sonnet dataset.",
1150+
help="Number of output tokens per request, "
1151+
"used only for sonnet dataset.",
11481152
)
11491153
sonnet_group.add_argument(
11501154
"--sonnet-prefix-len",
11511155
type=int,
11521156
default=200,
1153-
help="Number of prefix tokens per request, used only for sonnet dataset.",
1157+
help="Number of prefix tokens per request, "
1158+
"used only for sonnet dataset.",
11541159
)
11551160

11561161
sharegpt_group = parser.add_argument_group("sharegpt dataset options")
@@ -1167,13 +1172,15 @@ def main(args: argparse.Namespace):
11671172
"--random-input-len",
11681173
type=int,
11691174
default=1024,
1170-
help="Number of input tokens per request, used only for random sampling.",
1175+
help="Number of input tokens per request, "
1176+
"used only for random sampling.",
11711177
)
11721178
random_group.add_argument(
11731179
"--random-output-len",
11741180
type=int,
11751181
default=128,
1176-
help="Number of output tokens per request, used only for random sampling.",
1182+
help="Number of output tokens per request, "
1183+
"used only for random sampling.",
11771184
)
11781185
random_group.add_argument(
11791186
"--random-range-ratio",

benchmarks/benchmark_serving_structured_output.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ def sample_requests(
147147
f"__optional_field_{uuid.uuid4()}"
148148
] = {
149149
"type": "string",
150-
"description": "An unique optional field to avoid cached schemas",
150+
"description": "An unique optional field "
151+
"to avoid cached schemas",
151152
}
152153
else:
153154
json_schemas = [schema] * args.num_prompts

benchmarks/benchmark_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def write_to_json(filename: str, records: list) -> None:
103103
records,
104104
f,
105105
cls=InfEncoder,
106-
default=lambda o: f"<{type(o).__name__} object is not JSON serializable>",
106+
default=lambda o: f"<{type(o).__name__} "
107+
"object is not JSON serializable>",
107108
)
108109

109110

examples/optimum/run_encoder_only.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def compare_copy_prompt_task_result(scores: list[float], golden_json: str):
3737
golden_similarity = golden[i]["golden_similarity"]
3838
diff = abs(similarity - golden_similarity)
3939
print(
40-
"Difference: {:.3f} Similarity : {:.3f}, Golden Similarity: {:.3f}".format(
40+
"Difference: {:.3f} Similarity : {:.3f}, "
41+
"Golden Similarity: {:.3f}".format(
4142
diff, similarity, golden_similarity
4243
)
4344
)

examples/optimum/run_qwen3_reranker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def format_instruction(instruction, query, doc):
3535
},
3636
{
3737
"role": "user",
38-
"content": f"<Instruct>: {instruction}\n\n<Query>: {query}\n\n<Document>: {doc}",
38+
"content": f"<Instruct>: {instruction}\n\n"
39+
"<Query>: {query}\n\n<Document>: {doc}",
3940
},
4041
]
4142
return text

pyproject.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,17 @@ torchvision = { index = "pytorch-cpu" }
168168
name = "pytorch-cpu"
169169
url = "https://download.pytorch.org/whl/cpu"
170170
explicit = true
171+
172+
[tool.typos.default]
173+
binary = false
174+
check-filename = false
175+
check-file = true
176+
unicode = true
177+
ignore-hex = true
178+
identifier-leading-digits = false
179+
locale = "en"
180+
extend-ignore-identifiers-re = ["NVML_*", ".*Unc.*", ".*_thw",
181+
".*UE8M0.*", ".*[UE4M3|ue4m3].*", ".*eles.*",
182+
".*[Tt]h[rR].*"]
183+
extend-ignore-words-re = []
184+
extend-ignore-re = []

tests/entrypoints/openai/test_basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import requests
2323
from utils import RemoteOpenAIServer
2424

25-
MODEL_DIR = os.getenv("REBEL_VLLM_PRE_COMPILED_DIR")
25+
MODEL_DIR = os.getenv("REBEL_VLLM_PRE_COMPILED_DIR", ".")
2626
MODEL_NAME = MODEL_DIR + "/opt_125m_batch2"
2727
MAX_TOKENS = 1
2828

tests/entrypoints/openai/test_chat.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import pytest_asyncio
2020
from utils import RemoteOpenAIServer
2121

22-
MODEL_DIR = os.getenv("REBEL_VLLM_PRE_COMPILED_DIR")
22+
MODEL_DIR = os.getenv("REBEL_VLLM_PRE_COMPILED_DIR", ".")
2323
MODEL_NAME = MODEL_DIR + "/llama3_2-3b-128k_kv16k_batch4"
2424
MAX_TOKENS = 1
2525

@@ -37,8 +37,7 @@ def monkeypatch_module():
3737
def server(request, monkeypatch_module):
3838
use_v1 = request.param
3939
monkeypatch_module.setenv("VLLM_USE_V1", "1" if use_v1 else "0")
40-
args = []
41-
with RemoteOpenAIServer(MODEL_NAME, args) as remote_server:
40+
with RemoteOpenAIServer(MODEL_NAME, []) as remote_server:
4241
yield remote_server
4342

4443

0 commit comments

Comments
 (0)