From a12996d33c6053dad0e9a357601e3b35adc451ae Mon Sep 17 00:00:00 2001 From: Trevor Royer Date: Thu, 30 May 2024 16:53:03 -0600 Subject: [PATCH] add bad test model --- .../patch-inferenceservice-health-check.yaml | 12 +++++---- .../base/inference-service.yaml | 25 +++++++++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/components/operators/openshift-gitops/instance/components/health-check-openshift-ai/patch-inferenceservice-health-check.yaml b/components/operators/openshift-gitops/instance/components/health-check-openshift-ai/patch-inferenceservice-health-check.yaml index 4c1465b5..b73145e7 100644 --- a/components/operators/openshift-gitops/instance/components/health-check-openshift-ai/patch-inferenceservice-health-check.yaml +++ b/components/operators/openshift-gitops/instance/components/health-check-openshift-ai/patch-inferenceservice-health-check.yaml @@ -4,12 +4,16 @@ group: serving.kserve.io kind: InferenceService check: | - health_status = {} + local health_status = {} + health_status.status = "Progressing" health_status.message = "Waiting for InferenceService to report status..." if obj.status ~= nil then - progressing = false + + local progressing = false + local status_false = 0 + local status_unknown = 0 if obj.modelStatus ~= nil then if obj.modelStatus.transitionStatus == "InProgress" then @@ -22,9 +26,6 @@ for i, condition in pairs(obj.status.conditions) do - status_false = 0 - status_unknown = 0 - if condition.status == "Unknown" then status_unknown = status_unknown + 1 elseif condition.status == "False" then @@ -46,6 +47,7 @@ if progressing == false and status_unknown == 0 and status_false == 0 then health_status.status = "Healthy" + msg = "InferenceService is healthy." elseif progressing == true or status_unknown >= 0 then health_status.status = "Progressing" else diff --git a/tenants/ai-example/single-model-serving-tgis/base/inference-service.yaml b/tenants/ai-example/single-model-serving-tgis/base/inference-service.yaml index c151860c..c3900963 100644 --- a/tenants/ai-example/single-model-serving-tgis/base/inference-service.yaml +++ b/tenants/ai-example/single-model-serving-tgis/base/inference-service.yaml @@ -1,3 +1,4 @@ +--- apiVersion: serving.kserve.io/v1beta1 kind: InferenceService metadata: @@ -21,3 +22,27 @@ spec: storage: key: aws-connection-tgis path: models/flan-t5-small +--- +apiVersion: serving.kserve.io/v1beta1 +kind: InferenceService +metadata: + annotations: + openshift.io/display-name: tgis + serving.knative.openshift.io/enablePassthrough: "true" + sidecar.istio.io/inject: "true" + sidecar.istio.io/rewriteAppHTTPProbers: "true" + labels: + opendatahub.io/dashboard: "true" + name: tgis-test +spec: + predictor: + maxReplicas: 1 + minReplicas: 1 + model: + modelFormat: + name: pytorch + name: "" + runtime: tgis + storage: + key: aws-connection-tgis + path: models/flan-t5-small-blah