Skip to content

Commit 7fabfa1

Browse files
authored
Fix: Quote annotations (llm-d#483)
* Quote annotations * Also escape labels
1 parent ef9eb94 commit 7fabfa1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

setup/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ def add_annotations(varname: str) -> str:
11961196
for entry in annotations.split(","):
11971197
if ":" in entry:
11981198
key, value = entry.split(":", 1)
1199-
annotation_lines.append(f"{indent}{key.strip()}: {value.strip()}")
1199+
annotation_lines.append(f"{indent}{key.strip()}: \"{value.strip()}\"")
12001200

12011201
return "\n".join(annotation_lines)
12021202

setup/functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ function add_annotations {
207207
local varname=$1
208208

209209
for entry in $(echo ${!varname} | $LLMDBENCH_CONTROL_SCMD -e 's^\,^\n^g'); do
210-
output=$output"REPLACE_NEWLINEREPLACE_SPACESN$(echo ${entry} | $LLMDBENCH_CONTROL_SCMD -e 's^:^: ^g')"
210+
output=$output"REPLACE_NEWLINEREPLACE_SPACESN$(echo ${entry} | $LLMDBENCH_CONTROL_SCMD -e 's^:\(.*\)^: "\1"^g')"
211211
done
212212

213213
if [[ $LLMDBENCH_CONTROL_ENVIRONMENT_TYPE_STANDALONE_ACTIVE -eq 1 ]]; then

setup/steps/06_deploy_vllm_standalone_models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ def generate_deployment_yaml(ev, model, model_label):
197197
name: vllm-standalone-{model_label}
198198
labels:
199199
app: vllm-standalone-{model_label}
200-
stood-up-by: {ev['control_username']}
200+
stood-up-by: "{ev['control_username']}"
201201
stood-up-from: llm-d-benchmark
202-
stood-up-via: {ev['deploy_methods']}
202+
stood-up-via: "{ev['deploy_methods']}"
203203
namespace: {ev['vllm_common_namespace']}
204204
spec:
205205
replicas: {ev['vllm_common_replicas']}
@@ -332,9 +332,9 @@ def generate_service_yaml(ev, model, model_label):
332332
name: vllm-standalone-{model_label}
333333
namespace: {ev['vllm_common_namespace']}
334334
labels:
335-
stood-up-by: {ev['control_username']}
335+
stood-up-by: "{ev['control_username']}"
336336
stood-up-from: llm-d-benchmark
337-
stood-up-via: {ev['deploy_methods']}
337+
stood-up-via: "{ev['deploy_methods']}"
338338
spec:
339339
ports:
340340
- name: http

0 commit comments

Comments
 (0)