Skip to content

Commit e1f76e5

Browse files
p3rf Teamcopybara-github
authored andcommitted
Fix Kubernetes AI Inference benchmark.
PiperOrigin-RevId: 904660909
1 parent 7fe0de9 commit e1f76e5

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

perfkitbenchmarker/linux_benchmarks/kubernetes_ai_inference_benchmark.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,10 @@ def _ParseTPUModelLoadTimeMetrics(
372372
if (
373373
event.resource.kind == 'Pod'
374374
and event.resource.name == pod_name
375-
and 'Container started' in event.message
375+
and (
376+
'Container started' in event.message
377+
or 'Started container inference-server' in event.message
378+
)
376379
):
377380
startup_event = event
378381
if startup_event is None:
@@ -436,11 +439,12 @@ def _ParseModelLoadTimeMetrics(
436439
# Note: The event message format changed from "Started container <name>"
437440
# to "Container started" starting in Kubernetes v1.35 (PR #134043)
438441
# to make messages more generic.
439-
# TODO(user): If we ever want to support running against older k8s
440-
# versions and not just the latest, we may need to rethink what signals
441-
# we can use that have a stronger API guarantee, like
442-
# Pod.status.conditions
443-
and 'Container started' in event.message
442+
# we may need to rethink what signals we can use that have a stronger
443+
# API guarantee, like Pod.status.conditions
444+
and (
445+
'Container started' in event.message
446+
or 'Started container inference-server' in event.message
447+
)
444448
):
445449
startup_event = event
446450
if startup_event is None:

0 commit comments

Comments
 (0)