Skip to content

Commit 28f7e15

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 724334f commit 28f7e15

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

tests/model_serving/model_server/llmd/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,10 @@ def singlenode_precise_prefix_cache(
375375
"name": "VLLM_ADDITIONAL_ARGS",
376376
"value": (
377377
f"--prefix-caching-hash-algo {PREFIX_CACHE_HASH_ALGO} --block-size {PREFIX_CACHE_BLOCK_SIZE} "
378-
"--kv_transfer_config '{\"kv_connector\":\"NixlConnector\",\"kv_role\":\"kv_both\"}' "
379-
"--kv-events-config '{\"enable_kv_cache_events\":true,\"publisher\":\"zmq\","
380-
"\"endpoint\":\"tcp://{{ ChildName .ObjectMeta.Name `-epp-service` }}:5557\","
381-
"\"topic\":\"kv@${POD_IP}@${MODEL_NAME}\"}'"
378+
'--kv_transfer_config \'{"kv_connector":"NixlConnector","kv_role":"kv_both"}\' '
379+
'--kv-events-config \'{"enable_kv_cache_events":true,"publisher":"zmq",'
380+
'"endpoint":"tcp://{{ ChildName .ObjectMeta.Name `-epp-service` }}:5557",'
381+
'"topic":"kv@${POD_IP}@${MODEL_NAME}"}\''
382382
),
383383
},
384384
{

tests/model_serving/model_server/llmd/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141
],
4242
}
4343
],
44-
}
44+
}

tests/model_serving/model_server/llmd/test_singlenode_precise_prefix_cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
pytestmark = [pytest.mark.llmd_gpu]
3030

31+
3132
@pytest.mark.parametrize(
3233
"unprivileged_model_namespace",
3334
[pytest.param({"name": "singlenode-prefix-cache-test"})],

tests/model_serving/model_server/llmd/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,17 +265,17 @@ def count_chat_completions_requests_in_pod(pod: Pod) -> int:
265265
logs = pod.log(container="main", since_seconds=120)
266266

267267
# Match: "POST /v1/chat/completions HTTP/1.1" 200
268-
pattern = r'POST /v1/chat/completions HTTP/1.1.*200'
268+
pattern = r"POST /v1/chat/completions HTTP/1.1.*200"
269269
matches = re.findall(pattern, logs)
270270

271271
LOGGER.info(f"Pod {pod.name}: Found {len(matches)} requests matching pattern")
272272

273273
# Debug: Show sample log lines if no matches found
274274
if len(matches) == 0:
275-
log_lines = logs.split('\n')
275+
log_lines = logs.split("\n")
276276
LOGGER.info(f"Pod {pod.name}: Total log lines: {len(log_lines)}")
277277
# Show lines containing "POST" or "completions"
278-
relevant_lines = [line for line in log_lines if 'POST' in line or 'completion' in line.lower()]
278+
relevant_lines = [line for line in log_lines if "POST" in line or "completion" in line.lower()]
279279
if relevant_lines:
280280
LOGGER.info(f"Pod {pod.name}: Sample relevant lines (first 5):")
281281
for line in relevant_lines[:5]:
@@ -363,7 +363,7 @@ def verify_singlenode_prefix_cache_routing(
363363
inference_config = {
364364
"default_query_model": {
365365
"query_input": repeated_prompt,
366-
"query_output": r'.*',
366+
"query_output": r".*",
367367
"use_regex": True,
368368
},
369369
"chat_completions": TINYLLAMA_INFERENCE_CONFIG["chat_completions"],
@@ -411,7 +411,7 @@ def verify_singlenode_prefix_cache_routing(
411411
inference_config = {
412412
"default_query_model": {
413413
"query_input": prompt,
414-
"query_output": r'.*',
414+
"query_output": r".*",
415415
"use_regex": True,
416416
},
417417
"chat_completions": TINYLLAMA_INFERENCE_CONFIG["chat_completions"],

0 commit comments

Comments
 (0)