From 0e5cb5e4193649bf1143927be4a71ee4d710fb0b Mon Sep 17 00:00:00 2001 From: Rob Geada Date: Thu, 28 Sep 2023 14:57:48 +0100 Subject: [PATCH] TrustyAI CI: Update to MLServer 1.x (#941) Update mlserver to 1.x Update and rename openvino-inference-service.yaml to minio_sklearn_mlserver_model.yaml Rename odh-mlserver-0.x.yaml to odh-mlserver-1.x.yaml Update trustyai.sh to new mlserver version Update trustyai.sh to use correct output name --- tests/basictests/trustyai.sh | 8 ++++---- ...yaml => minio_sklearn_mlserver_model.yaml} | 2 +- ...lserver-0.x.yaml => odh-mlserver-1.x.yaml} | 19 +++---------------- 3 files changed, 8 insertions(+), 21 deletions(-) rename tests/resources/trustyai/{openvino-inference-service.yaml => minio_sklearn_mlserver_model.yaml} (97%) rename tests/resources/trustyai/{odh-mlserver-0.x.yaml => odh-mlserver-1.x.yaml} (71%) diff --git a/tests/basictests/trustyai.sh b/tests/basictests/trustyai.sh index 21fe80b16..29f4e86ae 100755 --- a/tests/basictests/trustyai.sh +++ b/tests/basictests/trustyai.sh @@ -33,12 +33,12 @@ function deploy_model() { os::cmd::expect_success "oc apply -f ${RESOURCEDIR}/modelmesh/service_account.yaml -n ${MM_NAMESPACE}" || eval "$FAILURE_HANDLING" oc label namespace $MM_NAMESPACE "modelmesh-enabled=true" --overwrite=true || echo "Failed to apply modelmesh-enabled label." os::cmd::expect_success "oc apply -f ${RESOURCEDIR}/trustyai/secret.yaml -n ${MM_NAMESPACE}" || eval "$FAILURE_HANDLING" - os::cmd::expect_success "oc apply -f ${RESOURCEDIR}/trustyai/odh-mlserver-0.x.yaml -n ${MM_NAMESPACE}" || eval "$FAILURE_HANDLING" + os::cmd::expect_success "oc apply -f ${RESOURCEDIR}/trustyai/odh-mlserver-1.x.yaml -n ${MM_NAMESPACE}" || eval "$FAILURE_HANDLING" SECRETKEY=$(openssl rand -hex 32) sed -i "s//$SECRETKEY/g" ${RESOURCEDIR}/trustyai/sample-minio.yaml || eval "$FAILURE_HANDLING" os::cmd::expect_success "oc apply -f ${RESOURCEDIR}/trustyai/sample-minio.yaml -n ${MM_NAMESPACE}" || eval "$FAILURE_HANDLING" - os::cmd::expect_success "oc apply -f ${RESOURCEDIR}/trustyai/openvino-inference-service.yaml -n ${MM_NAMESPACE}" || eval "$FAILURE_HANDLING" + os::cmd::expect_success "oc apply -f ${RESOURCEDIR}/trustyai/minio_sklearn_mlserver_model.yaml -n ${MM_NAMESPACE}" || eval "$FAILURE_HANDLING" os::cmd::expect_success "oc apply -f ${RESOURCEDIR}/trustyai/trustyai_crd.yaml -n ${MM_NAMESPACE}" || eval "$FAILURE_HANDLING" } @@ -98,7 +98,7 @@ function schedule_and_check_request(){ \"modelId\": \"example-sklearn-isvc\", \"protectedAttribute\": \"predict-0\", \"favorableOutcome\": 0, - \"outcomeName\": \"predict\", + \"outcomeName\": \"predict-0\", \"privilegedAttribute\": 0.0, \"unprivilegedAttribute\": 1.0 }'" "requestId" || eval "$FAILURE_HANDLING" @@ -140,7 +140,7 @@ function teardown_trustyai_test() { fi os::cmd::expect_success "oc delete -f ${RESOURCEDIR}/trustyai/secret.yaml" || eval "$FAILURE_HANDLING" - os::cmd::expect_success "oc delete -f ${RESOURCEDIR}/trustyai/odh-mlserver-0.x.yaml" || eval "$FAILURE_HANDLING" + os::cmd::expect_success "oc delete -f ${RESOURCEDIR}/trustyai/odh-mlserver-1.x.yaml" || eval "$FAILURE_HANDLING" os::cmd::expect_success "oc delete -f ${RESOURCEDIR}/trustyai/trustyai_crd.yaml" || eval "$FAILURE_HANDLING" os::cmd::expect_success "oc delete project $MM_NAMESPACE" || eval "$FAILURE_HANDLING" } diff --git a/tests/resources/trustyai/openvino-inference-service.yaml b/tests/resources/trustyai/minio_sklearn_mlserver_model.yaml similarity index 97% rename from tests/resources/trustyai/openvino-inference-service.yaml rename to tests/resources/trustyai/minio_sklearn_mlserver_model.yaml index 65bc0621e..ab5042db0 100644 --- a/tests/resources/trustyai/openvino-inference-service.yaml +++ b/tests/resources/trustyai/minio_sklearn_mlserver_model.yaml @@ -22,7 +22,7 @@ spec: model: modelFormat: name: sklearn - runtime: mlserver-0.x + runtime: mlserver-1.x storage: key: aws-connection-minio-data-connection path: sklearn/model.joblib diff --git a/tests/resources/trustyai/odh-mlserver-0.x.yaml b/tests/resources/trustyai/odh-mlserver-1.x.yaml similarity index 71% rename from tests/resources/trustyai/odh-mlserver-0.x.yaml rename to tests/resources/trustyai/odh-mlserver-1.x.yaml index 5b61204d7..7ef2a6579 100644 --- a/tests/resources/trustyai/odh-mlserver-0.x.yaml +++ b/tests/resources/trustyai/odh-mlserver-1.x.yaml @@ -1,24 +1,11 @@ -# Copyright 2021 IBM Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. apiVersion: serving.kserve.io/v1alpha1 kind: ServingRuntime metadata: - name: mlserver-0.x + name: mlserver-1.x annotations: enable-route: "true" labels: - name: modelmesh-serving-mlserver-0.x-SR + name: modelmesh-serving-mlserver-1.x-SR spec: supportedModelFormats: - name: sklearn @@ -40,7 +27,7 @@ spec: containers: - name: mlserver - image: quay.io/opendatahub/mlserver:0.5.2 + image: seldonio/mlserver:1.3.2 env: - name: MLSERVER_MODELS_DIR value: "/models/_mlserver_models/"