Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
TrustyAI CI: Update to MLServer 1.x (#941)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
RobGeada committed Sep 28, 2023
1 parent 6dd36fe commit 0e5cb5e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
8 changes: 4 additions & 4 deletions tests/basictests/trustyai.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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>/$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"
}

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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/"
Expand Down

0 comments on commit 0e5cb5e

Please sign in to comment.