Skip to content

Commit 5c0ca6d

Browse files
committed
Merge remote-tracking branch 'upstream/incubating'
2 parents 7f2f255 + 72e15db commit 5c0ca6d

14 files changed

+371
-122
lines changed

config/runtimes/ovms-kserve-template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ objects:
2525
spec:
2626
multiModel: false
2727
annotations:
28+
opendatahub.io/kserve-runtime: 'ovms'
2829
prometheus.io/port: '8888'
2930
prometheus.io/path: /metrics
3031
supportedModelFormats:

config/runtimes/vllm-cpu-template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ objects:
2727
opendatahub.io/dashboard: 'true'
2828
spec:
2929
annotations:
30+
opendatahub.io/kserve-runtime: 'vllm'
3031
prometheus.io/port: '8080'
3132
prometheus.io/path: '/metrics'
3233
multiModel: false

config/runtimes/vllm-cuda-template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ objects:
2828
opendatahub.io/dashboard: 'true'
2929
spec:
3030
annotations:
31+
opendatahub.io/kserve-runtime: 'vllm'
3132
prometheus.io/port: '8080'
3233
prometheus.io/path: '/metrics'
3334
multiModel: false

config/runtimes/vllm-gaudi-template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ objects:
2828
opendatahub.io/dashboard: 'true'
2929
spec:
3030
annotations:
31+
opendatahub.io/kserve-runtime: 'vllm'
3132
prometheus.io/port: '8080'
3233
prometheus.io/path: '/metrics'
3334
multiModel: false

config/runtimes/vllm-multinode-template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ objects:
2828
opendatahub.io/dashboard: 'false'
2929
spec:
3030
annotations:
31+
opendatahub.io/kserve-runtime: 'vllm'
3132
prometheus.io/port: '8080'
3233
prometheus.io/path: '/metrics'
3334
multiModel: false

config/runtimes/vllm-rocm-template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ objects:
2828
opendatahub.io/dashboard: 'true'
2929
spec:
3030
annotations:
31+
opendatahub.io/kserve-runtime: 'vllm'
3132
prometheus.io/port: '8080'
3233
prometheus.io/path: '/metrics'
3334
multiModel: false

config/runtimes/vllm-spyre-s390x-template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ objects:
2828
opendatahub.io/dashboard: 'true'
2929
spec:
3030
annotations:
31+
opendatahub.io/kserve-runtime: 'vllm'
3132
prometheus.io/path: /metrics
3233
prometheus.io/port: '8080'
3334
containers:

config/runtimes/vllm-spyre-x86-template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ objects:
2828
opendatahub.io/dashboard: 'true'
2929
spec:
3030
annotations:
31+
opendatahub.io/kserve-runtime: 'vllm'
3132
prometheus.io/path: /metrics
3233
prometheus.io/port: '8080'
3334
containers:

internal/controller/constants/constants.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const (
3131
KserveNetworkVisibility = "networking.kserve.io/visibility"
3232
KserveGroupAnnotation = "serving.kserve.io/inferenceservice"
3333
RhoaiObservabilityLabel = "monitoring.opendatahub.io/scrape"
34+
RuntimesBaseAnnotation = "opendatahub.io"
3435

3536
ODHManagedLabel = "opendatahub.io/managed"
3637
EnableAuthODHAnnotation = "security.opendatahub.io/enable-auth"
@@ -90,11 +91,11 @@ const (
9091
IntervalValue = "1m"
9192
RequestRateInterval = "5m"
9293
GPUKVCacheSamplingInterval = "24h"
93-
OvmsImageName = "openvino_model_server"
94-
TgisImageName = "text-generation-inference"
95-
VllmImageName = "vllm"
96-
CaikitImageName = "caikit-nlp"
97-
ServingRuntimeFallBackImageName = "unsupported"
94+
95+
KServeRuntimeAnnotation = RuntimesBaseAnnotation + "/kserve-runtime"
96+
OvmsRuntimeName = "ovms"
97+
TgisRuntimeName = "tgis"
98+
VllmRuntimeName = "vllm"
9899
)
99100

100101
// openshift

internal/controller/serving/inferenceservice_controller_test.go

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,16 @@ import (
4040
"sigs.k8s.io/controller-runtime/pkg/client"
4141

4242
"github.com/opendatahub-io/odh-model-controller/internal/controller/constants"
43-
"github.com/opendatahub-io/odh-model-controller/internal/controller/utils"
4443
. "github.com/opendatahub-io/odh-model-controller/test/matchers"
4544
testutils "github.com/opendatahub-io/odh-model-controller/test/utils"
4645
)
4746

4847
const (
4948
KserveOvmsInferenceServiceName = "example-onnx-mnist"
5049
UnsupportedMetricsInferenceServiceName = "sklearn-v2-iris"
51-
NilRuntimeInferenceServiceName = "sklearn-v2-iris-no-runtime"
52-
NilModelInferenceServiceName = "custom-runtime"
5350

5451
UnsupportedMetricsInferenceServicePath = "./testdata/deploy/kserve-unsupported-metrics-inference-service.yaml"
5552
UnsupprtedMetricsServingRuntimePath = "./testdata/deploy/kserve-unsupported-metrics-serving-runtime.yaml"
56-
NilRuntimeInferenceServicePath = "./testdata/deploy/kserve-nil-runtime-inference-service.yaml"
57-
NilModelInferenceServicePath = "./testdata/deploy/kserve-nil-model-inference-service.yaml"
5853
)
5954

6055
var _ = Describe("InferenceService Controller", func() {
@@ -94,38 +89,6 @@ var _ = Describe("InferenceService Controller", func() {
9489
return inferenceService
9590
}
9691

97-
verifyConfigMap := func(isvcName string, namespace string, supported bool, metricsData string) {
98-
metricsConfigMap, err := testutils.WaitForConfigMap(k8sClient, namespace, isvcName+constants.KserveMetricsConfigMapNameSuffix, 30, 1*time.Second)
99-
Expect(err).NotTo(HaveOccurred())
100-
Expect(metricsConfigMap).NotTo(BeNil())
101-
var expectedMetricsConfigMap *corev1.ConfigMap
102-
if supported {
103-
finaldata := utils.SubstituteVariablesInQueries(metricsData, namespace, isvcName)
104-
expectedMetricsConfigMap = &corev1.ConfigMap{
105-
ObjectMeta: metav1.ObjectMeta{
106-
Name: isvcName + constants.KserveMetricsConfigMapNameSuffix,
107-
Namespace: namespace,
108-
},
109-
Data: map[string]string{
110-
"supported": "true",
111-
"metrics": finaldata,
112-
},
113-
}
114-
} else {
115-
expectedMetricsConfigMap = &corev1.ConfigMap{
116-
ObjectMeta: metav1.ObjectMeta{
117-
Name: UnsupportedMetricsInferenceServiceName + constants.KserveMetricsConfigMapNameSuffix,
118-
Namespace: testNs,
119-
},
120-
Data: map[string]string{
121-
"supported": "false",
122-
},
123-
}
124-
}
125-
Expect(testutils.CompareConfigMap(metricsConfigMap, expectedMetricsConfigMap)).Should(BeTrue())
126-
Expect(expectedMetricsConfigMap.Data).NotTo(HaveKeyWithValue("metrics", ContainSubstring("${REQUEST_RATE_INTERVAL}")))
127-
}
128-
12992
BeforeEach(func() {
13093
testNs = testutils.Namespaces.Create(ctx, k8sClient).Name
13194

@@ -136,34 +99,6 @@ var _ = Describe("InferenceService Controller", func() {
13699
}
137100
})
138101

139-
When("deploying a Kserve model", func() {
140-
It("[raw] if the runtime is supported for metrics, it should create a configmap with prometheus queries", func() {
141-
_ = createServingRuntime(testNs, KserveServingRuntimePath1)
142-
_ = createInferenceService(testNs, KserveOvmsInferenceServiceName, KserveInferenceServicePath1, true)
143-
144-
verifyConfigMap(KserveOvmsInferenceServiceName, testNs, true, constants.OvmsMetricsData)
145-
})
146-
147-
It("[raw] if the runtime is not supported for metrics, it should create a configmap with the unsupported config", func() {
148-
_ = createServingRuntime(testNs, UnsupprtedMetricsServingRuntimePath)
149-
_ = createInferenceService(testNs, UnsupportedMetricsInferenceServiceName, UnsupportedMetricsInferenceServicePath, true)
150-
151-
verifyConfigMap(UnsupportedMetricsInferenceServiceName, testNs, false, "")
152-
})
153-
154-
It("[raw] if the isvc does not have a runtime specified and there is no supported runtime, an unsupported metrics configmap should be created", func() {
155-
_ = createInferenceService(testNs, NilRuntimeInferenceServiceName, NilRuntimeInferenceServicePath, true)
156-
157-
verifyConfigMap(NilRuntimeInferenceServiceName, testNs, false, "")
158-
})
159-
160-
It("[raw] if the isvc does not have the model field specified, an unsupported metrics configmap should be created", func() {
161-
_ = createInferenceService(testNs, NilModelInferenceServiceName, NilModelInferenceServicePath, true)
162-
163-
verifyConfigMap(NilModelInferenceServiceName, testNs, false, "")
164-
})
165-
})
166-
167102
When("deleting the deployed models", func() {
168103
timeout10s := time.Second * 10
169104
interval4s := time.Second * 4

0 commit comments

Comments
 (0)