Skip to content

Commit 714d8b3

Browse files
Merge pull request #171 from albertoperdomo2/feat/guidellm-pvc-storageclass
feat: GuideLLM PVC storageClass support
2 parents d3332ea + 6eb621a commit 714d8b3

6 files changed

Lines changed: 19 additions & 5 deletions

File tree

projects/guidellm/toolbox/run_guidellm_benchmark/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def run(
5454
image: str = "ghcr.io/vllm-project/guidellm:v0.6.0",
5555
timeout: int = 900,
5656
pvc_size: str = "1Gi",
57+
pvc_storage_class: str | None = None,
5758
guidellm_args: list[str] | None = None,
5859
hf_token_secret: str = "",
5960
fs_group: int | None = None,
@@ -189,6 +190,7 @@ def create_guidellm_resources_task(args, ctx):
189190
namespace=ctx.target_namespace,
190191
name=ctx.benchmark_name,
191192
pvc_size=args.pvc_size,
193+
pvc_storage_class=args.pvc_storage_class,
192194
owner_reference=owner_reference,
193195
),
194196
)

projects/guidellm/toolbox/run_guidellm_benchmark/templates/guidellm_pvc.yaml.j2

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ metadata:
99
forge.openshift.io/project: llm_d
1010
spec:
1111
accessModes:
12-
- ReadWriteOnce
12+
- {{ "ReadWriteMany" if pvc_storage_class else "ReadWriteOnce" }}
13+
{% if pvc_storage_class %}
14+
storageClassName: {{ pvc_storage_class }}
15+
{% endif %}
1316
resources:
1417
requests:
15-
storage: {{ pvc_size }}
18+
storage: {{ pvc_size }}

projects/guidellm/toolbox/run_guidellm_benchmark/utils.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,20 @@ def _build_multi_run_script(*, endpoint_url: str, runs: list[GuideLLMRun]) -> st
147147

148148

149149
def render_guidellm_pvc_from_parts(
150-
*, namespace: str, name: str, pvc_size: str, owner_reference: dict[str, Any] | None = None
150+
*,
151+
namespace: str,
152+
name: str,
153+
pvc_size: str,
154+
pvc_storage_class: str | None = None,
155+
owner_reference: dict[str, Any] | None = None,
151156
) -> dict[str, Any]:
152157
"""Render a GuideLL-M PVC manifest from individual components.
153158
154159
Args:
155160
namespace: Target namespace
156161
name: Name of the benchmark job and PVC
157162
pvc_size: Size of the PVC
163+
pvc_storage_class: Optional storage class name for the PVC
158164
owner_reference: Optional owner reference to set (e.g., for job ownership)
159165
160166
Returns:
@@ -166,6 +172,7 @@ def render_guidellm_pvc_from_parts(
166172
"namespace": namespace,
167173
"name": name,
168174
"pvc_size": pvc_size,
175+
"pvc_storage_class": pvc_storage_class,
169176
},
170177
)
171178
manifest = yaml.safe_load(rendered_yaml)

projects/llm_d/orchestration/config.d/workloads.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
job_name: guidellm-benchmark
22
image: ghcr.io/vllm-project/guidellm:v0.5.4
33
pvc_size: 1Gi
4+
pvc_storage_class: null
45
timeout_seconds: 3600
56
args: {}
67

projects/llm_d/orchestration/runtime_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def _resolve_benchmark_config(benchmark_name: str) -> dict[str, Any]:
355355
)
356356
workload_defaults = copy.deepcopy(config.project.get_config("workloads", print=False))
357357

358-
default_keys = ("job_name", "image", "pvc_size", "timeout_seconds")
358+
default_keys = ("job_name", "image", "pvc_size", "pvc_storage_class", "timeout_seconds")
359359
for key in default_keys:
360360
if key in workload_defaults and key not in benchmark:
361361
benchmark[key] = workload_defaults[key]
@@ -401,7 +401,7 @@ def get_workload_config() -> dict[str, Any] | None:
401401
return None
402402

403403
# Apply same merging logic as _resolve_benchmark_config
404-
default_keys = ("job_name", "image", "pvc_size", "timeout_seconds")
404+
default_keys = ("job_name", "image", "pvc_size", "pvc_storage_class", "timeout_seconds")
405405
for key in default_keys:
406406
if key in workload_defaults and key not in default_benchmark:
407407
default_benchmark[key] = workload_defaults[key]

projects/llm_d/orchestration/test_phase.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ def run_guidellm_benchmark(*, endpoint_url: str) -> None:
715715
image=benchmark.get("image"),
716716
timeout=benchmark.get("timeout_seconds"),
717717
pvc_size=benchmark.get("pvc_size"),
718+
pvc_storage_class=benchmark.get("pvc_storage_class"),
718719
guidellm_args=guidellm_args,
719720
)
720721

0 commit comments

Comments
 (0)