Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
42ad31a
[kserve] toolbox: deploy_llmisvc: correctly resolve the kserve address
kpouget Jul 21, 2026
74f94fd
[kserve] toolbox: deploy_llmisvc: improve wait_old_pods_gone
kpouget Jul 21, 2026
ce0d075
[kserve] toolbox: prepare_hf_model_cache: wait for the pod to start r…
kpouget Jul 22, 2026
ca2bcec
[kserve] toolbox: capture_llmisvc_state: capture more information
kpouget Jul 22, 2026
049bdcc
[kserve] toolbox: deploy_llmisvc: capture more information
kpouget Jul 22, 2026
35efb51
[kserve] toolbox: prepare_hf_model_cache: wait 1h for the download co…
kpouget Jul 22, 2026
d8f7538
[kserve] toolbox: deploy_llmisvc: add flag to wait_pods_scheduled
kpouget Jul 22, 2026
b957741
[kserve] toolbox: deploy_llmisvc: capture_final_llmisvc_yaml: better …
kpouget Jul 23, 2026
e9c25dd
[kserve] toolbox: deploy_llmisvc: abort on Pod restart
kpouget Jul 23, 2026
3d80550
[kserve] toolbox: deploy_llmisvc: improve the URL resolution
kpouget Jul 23, 2026
02247d6
[kserve] toolbox: deploy_llmisvc: also wait on SchedulingGated
kpouget Jul 23, 2026
ef3abf5
[kserve] toolbox: deploy_llmisvc: expose the try_resolve_endpoint_url…
kpouget Jul 23, 2026
8ef80c1
[kserve] toolbox: deploy_llmisvc: save the deploy/rs/pod description
kpouget Jul 23, 2026
96b00a0
[guidellm] toolbox: run_smoke_request: save the pod info in a file
kpouget Jul 22, 2026
68b26a8
[guidellm] toolbox: run_smoke_request: don't wait for the pod deletion
kpouget Jul 23, 2026
bcde3d0
[guidellm] toolbox: run_guidellm_benchmark: give more time
kpouget Jul 23, 2026
b4e8c2c
[guidellm] toolbox: run_guidellm_benchmark: set the owner of the PVC
kpouget Jul 23, 2026
c5547eb
[caliper] engine: parameter_matrix: don't truncate long parameters
kpouget Jul 27, 2026
b7f46d8
[llm_d] tests: test_deployment_profiles: add a 60s timeout
kpouget Jul 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions projects/caliper/engine/parameter_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,4 @@ def create_legend_name(

legend_name = ", ".join(param_pairs)

# Truncate if too long
if len(legend_name) > max_length:
legend_name = legend_name[: max_length - 3] + "..."

return legend_name
40 changes: 29 additions & 11 deletions projects/guidellm/toolbox/run_guidellm_benchmark/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,12 @@ def _best_effort_delete(description: str, *oc_args: str) -> None:

@task
def create_guidellm_resources_task(args, ctx):
"""Create the GuideLLM benchmark PVC and job"""
"""Create the GuideLLM benchmark job and PVC with job as owner"""

# Ensure src directory exists
(args.artifact_dir / "src").mkdir(parents=True, exist_ok=True)

oc_apply(
args.artifact_dir / "src" / "guidellm-pvc.yaml",
render_guidellm_pvc_from_parts(
namespace=ctx.target_namespace,
name=ctx.benchmark_name,
pvc_size=args.pvc_size,
),
)
# Create the job first
oc_apply(
args.artifact_dir / "src" / "guidellm-job.yaml",
render_guidellm_job_from_parts(
Expand All @@ -144,10 +137,35 @@ def create_guidellm_resources_task(args, ctx):
hf_token_secret=args.hf_token_secret,
),
)
return f"GuideLLM benchmark {ctx.benchmark_name} created"

# Get the job metadata for owner reference
job_data = oc_get_json("job", name=ctx.benchmark_name, namespace=ctx.target_namespace)

# Create owner reference from job metadata
owner_reference = {
"apiVersion": "batch/v1",
"kind": "Job",
"name": job_data["metadata"]["name"],
"uid": job_data["metadata"]["uid"],
"controller": True,
"blockOwnerDeletion": True,
}

# Create the PVC with job as owner
oc_apply(
args.artifact_dir / "src" / "guidellm-pvc.yaml",
render_guidellm_pvc_from_parts(
namespace=ctx.target_namespace,
name=ctx.benchmark_name,
pvc_size=args.pvc_size,
owner_reference=owner_reference,
),
)

return f"GuideLLM benchmark {ctx.benchmark_name} created with job as PVC owner"


@retry(attempts=180, delay=10, backoff=1.0)
@retry(attempts=1080, delay=10, backoff=1.0)
@task
def wait_guidellm_benchmark_task(args, ctx):
"""Wait for the GuideLLM benchmark job to complete"""
Expand Down
13 changes: 11 additions & 2 deletions projects/guidellm/toolbox/run_guidellm_benchmark/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,16 @@ def _build_multi_run_script(*, endpoint_url: str, runs: list[GuideLLMRun]) -> st
return "\n".join(lines)


def render_guidellm_pvc_from_parts(*, namespace: str, name: str, pvc_size: str) -> dict[str, Any]:
def render_guidellm_pvc_from_parts(
*, namespace: str, name: str, pvc_size: str, owner_reference: dict[str, Any] | None = None
) -> dict[str, Any]:
"""Render a GuideLL-M PVC manifest from individual components.

Args:
namespace: Target namespace
name: Name of the benchmark job and PVC
pvc_size: Size of the PVC
owner_reference: Optional owner reference to set (e.g., for job ownership)

Returns:
PVC manifest as dict
Expand All @@ -165,7 +168,13 @@ def render_guidellm_pvc_from_parts(*, namespace: str, name: str, pvc_size: str)
"pvc_size": pvc_size,
},
)
return yaml.safe_load(rendered_yaml)
manifest = yaml.safe_load(rendered_yaml)

# Add owner reference if provided
if owner_reference:
manifest["metadata"]["ownerReferences"] = [owner_reference]

return manifest


def render_guidellm_job_from_parts(
Expand Down
2 changes: 2 additions & 0 deletions projects/guidellm/toolbox/run_smoke_request/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ def capture_smoke_pod_debug_info(args, ctx):
"-o",
"yaml",
check=False,
stdout_dest=artifacts_dir / f"{ctx.pod_name}.yaml",
Comment thread
kpouget marked this conversation as resolved.
)

# Capture pod description
Expand Down Expand Up @@ -283,6 +284,7 @@ def cleanup_smoke_pod(args, ctx):
"-n",
args.namespace,
"--ignore-not-found=true",
"--wait=false",
check=False,
)
return f"Cleaned up smoke pod {ctx.pod_name}"
Expand Down
52 changes: 26 additions & 26 deletions projects/kserve/toolbox/capture_llmisvc_state/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def setup_directories(args, context):
"""Create the artifacts directory"""

shell.mkdir("artifacts")
shell.mkdir("artifacts/logs")
return "Artifacts directory created"


Expand Down Expand Up @@ -121,7 +122,7 @@ def capture_namespace_pods(args, context):
"""Capture all pods in the namespace with wide output"""
shell.run(
f"oc get pods -owide -n {context.target_namespace}",
stdout_dest=args.artifact_dir / "artifacts/namespace.pods.status",
stdout_dest=args.artifact_dir / "artifacts/namespace.pods.status.txt",
check=False,
)
return "Namespace pods status captured"
Expand All @@ -132,7 +133,7 @@ def capture_namespace_services(args, context):
"""Capture all services in the namespace"""
shell.run(
f"oc get svc -n {context.target_namespace}",
stdout_dest=args.artifact_dir / "artifacts/namespace.services.status",
stdout_dest=args.artifact_dir / "artifacts/namespace.services.status.txt",
check=False,
)
return "Namespace services captured"
Expand Down Expand Up @@ -173,20 +174,19 @@ def capture_pod_logs(args, context):
if not pod_names or not result.stdout.strip():
return "No pods found to capture logs"

log_file = args.artifact_dir / "artifacts/llminferenceservice.pods.logs"
logs_dir = args.artifact_dir / "artifacts/logs"
captured_count = 0

with open(log_file, "w") as handle:
for pod_name in pod_names:
handle.write(f"=== Logs for pod: {pod_name} ===\n")
log_result = shell.run(
f"oc logs {pod_name} -n {context.target_namespace} --all-containers=true",
check=False,
log_stdout=False,
)
handle.write(log_result.stdout)
handle.write("\n")
for pod_name in pod_names:
log_file = logs_dir / f"{pod_name}.log"
shell.run(
f"oc logs {pod_name} -n {context.target_namespace} --all-containers=true",
stdout_dest=log_file,
check=False,
)
captured_count += 1

return f"Pod logs captured for {len(pod_names)} pods"
return f"Pod logs captured for {captured_count} pods in dedicated files"


@task
Expand All @@ -195,26 +195,26 @@ def capture_pod_previous_logs(args, context):
result = shell.run(
f'oc get pods -l "app.kubernetes.io/name={args.llmisvc_name}" -n {context.target_namespace} -o jsonpath="{{.items[*].metadata.name}}"',
check=False,
log_stdout=False,
)

pod_names = result.stdout.strip().split()
if not pod_names or not result.stdout.strip():
return "No pods found to capture previous logs"

log_file = args.artifact_dir / "artifacts/llminferenceservice.pods.previous.logs"
logs_dir = args.artifact_dir / "artifacts/logs"
captured_count = 0

with open(log_file, "w") as handle:
for pod_name in pod_names:
handle.write(f"=== Previous logs for pod: {pod_name} ===\n")
log_result = shell.run(
f"oc logs {pod_name} -n {context.target_namespace} --previous --all-containers=true",
check=False,
log_stdout=False,
)
handle.write(log_result.stdout)
handle.write("\n")
for pod_name in pod_names:
log_file = logs_dir / f"{pod_name}.previous.log"
shell.run(
f"oc logs {pod_name} -n {context.target_namespace} --previous --all-containers=true",
stdout_dest=log_file,
check=False,
)
captured_count += 1

return f"Pod previous logs captured for {len(pod_names)} pods"
return f"Pod previous logs captured for {captured_count} pods in dedicated files"


@task
Expand Down
5 changes: 5 additions & 0 deletions projects/kserve/toolbox/deploy_llmisvc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from __future__ import annotations

from projects.kserve.toolbox.deploy_llmisvc.main import try_resolve_endpoint_url

__all__ = ["try_resolve_endpoint_url"]
Loading
Loading