Skip to content

Commit

Permalink
temp test, only testing pmml
Browse files Browse the repository at this point in the history
  • Loading branch information
AnyISalIn committed Oct 27, 2020
1 parent 41f0957 commit 0019151
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/e2e/predictor/test_pmml.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_pmml_kfserving():
predictor=V1alpha2PredictorSpec(
min_replicas=1,
pmml=V1alpha2PMMLSpec(
storage_uri='gs://anyisalin-model-store/pmml',
storage_uri='gs://kfserving-samples/models/tensorflow/flowers',
resources=V1ResourceRequirements(
requests={'cpu': '100m', 'memory': '256Mi'},
limits={'cpu': '100m', 'memory': '256Mi'}))))
Expand All @@ -48,7 +48,7 @@ def test_pmml_kfserving():
spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec))

KFServing.create(isvc)
KFServing.wait_isvc_ready(service_name, namespace=KFSERVING_TEST_NAMESPACE)
KFServing.wait_isvc_ready(service_name, namespace=KFSERVING_TEST_NAMESPACE, timeout_seconds=3000)
res = predict(service_name, './data/pmml_input.json')
assert(res["predictions"] == [[1.0, 0.0, 0.0, "2"]])
KFServing.delete(service_name, KFSERVING_TEST_NAMESPACE)
8 changes: 4 additions & 4 deletions test/scripts/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ kubectl config set-context $(kubectl config current-context) --namespace=default
echo "Grant cluster-admin permissions to the current user ..."
kubectl create clusterrolebinding cluster-admin-binding \
--clusterrole=cluster-admin \
--user=$(gcloud config get-value core/account)
--user=$(gcloud config get-value core/account) --dry-run -o yaml | kubectl apply -f -

# Install and Initialize Helm
wget https://get.helm.sh/helm-v3.0.2-linux-amd64.tar.gz
tar xvf helm-v3.0.2-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/

echo "Install istio ..."
mkdir istio_tmp
[ -d istio_tmp ] || (mkdir istio_tmp && \
pushd istio_tmp >/dev/null
curl -L https://git.io/getLatestIstio | ISTIO_VERSION=${ISTIO_VERSION} sh -
cd istio-${ISTIO_VERSION}
Expand Down Expand Up @@ -137,7 +137,7 @@ pushd istio_tmp >/dev/null
> ./istio-local-gateway.yaml

kubectl apply -f istio-local-gateway.yaml
popd
popd)

echo "Waiting for istio started ..."
waiting_pod_running "istio-system"
Expand Down Expand Up @@ -165,7 +165,7 @@ sleep 120 # Wait for webhook install finished totally.
echo "Install KFServing ..."
export GOPATH="$HOME/go"
export PATH="${PATH}:${GOPATH}/bin"
mkdir -p ${GOPATH}/src/github.com/kubeflow
[ -d ${GOPATH}/src/github.com/kubeflow ] || mkdir -p ${GOPATH}/src/github.com/kubeflow
cp -rf ../kfserving ${GOPATH}/src/github.com/kubeflow
cd ${GOPATH}/src/github.com/kubeflow/kfserving
make deploy-ci
Expand Down
7 changes: 7 additions & 0 deletions test/workflows/components/workflows.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@
name: "build-sklearnserver",
template: "build-sklearnserver",
},
{
name: "build-pmmlserver",
template: "build-pmmlserver",
},
],
[
{
Expand Down Expand Up @@ -357,6 +361,9 @@
$.parts(namespace, name, overrides).e2e(prow_env, bucket).buildTemplate("build-sklearnserver", testWorkerImage, [
"test/scripts/build-python-image.sh", "sklearn.Dockerfile", "sklearnserver", "latest"
]), // build-sklearnserver
$.parts(namespace, name, overrides).e2e(prow_env, bucket).buildTemplate("build-pmmlserver", testWorkerImage, [
"test/scripts/build-python-image.sh", "pmml.Dockerfile", "pmmlserver", "latest"
]), // build-pmmlserver
$.parts(namespace, name, overrides).e2e(prow_env, bucket).buildTemplate("unit-test", testWorkerImage, [
"test/scripts/unit-test.sh",
]), // unit test
Expand Down

0 comments on commit 0019151

Please sign in to comment.