From 48397dcdca947e380c57c2a5948204c40b1dc5e4 Mon Sep 17 00:00:00 2001 From: David McWhorter Date: Tue, 31 Oct 2023 15:56:50 -0400 Subject: [PATCH] disable tensorflow test --- test/seldon/model/create-rabbit-models | 15 +++++--- test/seldon/model/test-rabbit-models | 53 ++++++++++++++------------ 2 files changed, 38 insertions(+), 30 deletions(-) diff --git a/test/seldon/model/create-rabbit-models b/test/seldon/model/create-rabbit-models index 8bb7867084..2f3f23ca82 100755 --- a/test/seldon/model/create-rabbit-models +++ b/test/seldon/model/create-rabbit-models @@ -11,15 +11,20 @@ COMPUTE_NAMESPACE=seldon-regression-test echo ">>> Creating iris rabbitmq model..." kubectl apply -f $MODELS_DIR/iris-model-rabbitmq.yaml -n $COMPUTE_NAMESPACE -echo ">>> Creating cifar10 rabbitmq model..." -kubectl apply -f $MODELS_DIR/cifar10-rest-rabbitmq.yaml -n $COMPUTE_NAMESPACE - sleep 5 echo ">>> Waiting for iris model deployment to become available..." kubectl wait deployment.apps/iris-model-rabbitmq-default-0-classifier -n $COMPUTE_NAMESPACE --for condition=Available=True --timeout=600s -echo ">>> Waiting for cifar10 model deployment to become available..." -kubectl wait deployment.apps/tfserving-cifar10-rabbitmq-model-0-resnet32 -n $COMPUTE_NAMESPACE --for condition=Available=True --timeout=600s +# +# Tensorflow model does not work as our RabbitMQ server only accepts payloads in Seldon format, not raw tensorflow +# +#echo ">>> Creating cifar10 rabbitmq model..." +#kubectl apply -f $MODELS_DIR/cifar10-rest-rabbitmq.yaml -n $COMPUTE_NAMESPACE +# +#sleep 5 +# +#echo ">>> Waiting for cifar10 model deployment to become available..." +#kubectl wait deployment.apps/tfserving-cifar10-rabbitmq-model-0-resnet32 -n $COMPUTE_NAMESPACE --for condition=Available=True --timeout=600s echo ">>> Done deploying models." diff --git a/test/seldon/model/test-rabbit-models b/test/seldon/model/test-rabbit-models index bc97db9455..75324340b5 100755 --- a/test/seldon/model/test-rabbit-models +++ b/test/seldon/model/test-rabbit-models @@ -13,7 +13,6 @@ COMPUTE_NAMESPACE=seldon-regression-test RABBITMQ_USER=$(kubectl -n rabbitmq get secret rabbitmq-cluster-default-user -o jsonpath="{.data.username}" | base64 --decode) RABBITMQ_PASSWORD=$(kubectl -n rabbitmq get secret rabbitmq-cluster-default-user -o jsonpath="{.data.password}" | base64 --decode) EXPECTED_IRIS_RESULT_PAYLOAD='{"data":{"names":["t:0","t:1","t:2"],"ndarray":[[0.0006985194531162835,0.00366803903943666,0.995633441507447]]},"meta":{"requestPath":{"classifier":"seldonio/sklearnserver:1.17.1"}}}' -EXPECTED_CIFAR10_RESULT_PAYLOAD='1.45e-08,1.25e-09,1.63e-07,1.15e-01,1.74e-07,6.19e-06,8.85e-01,6.07e-09,7.44e-08,4.73e-09,' echo ">>> Sending predict message to iris rabbitmq model input queue..." kubectl -n rabbitmq exec rabbitmq-cluster-server-0 -c rabbitmq -- \ @@ -38,27 +37,31 @@ if [ "${EXPECTED_IRIS_RESULT_PAYLOAD}" != "${IRIS_RESULT_PAYLOAD}" ]; then exit 1 fi -CIFAR10_REQUEST_PAYLOAD="$(<$MODELS_DIR/cifar10_tensorflow_single.json)" -echo ">>> Sending predict message to cifar10 rabbitmq model input queue..." -kubectl -n rabbitmq exec rabbitmq-cluster-server-0 -c rabbitmq -- \ - curl -X POST "http://localhost:15672/api/exchanges/%2F/amq.default/publish" \ - --user "${RABBITMQ_USER}:${RABBITMQ_PASSWORD}" \ - -H "Content-type: application/json" \ - -H "Accept: application/json" \ - -d "${CIFAR10_REQUEST_PAYLOAD}" - -function retrieveCifar10Result { - CIFAR10_RESULT_PAYLOAD=$(kubectl -n rabbitmq exec rabbitmq-cluster-server-0 -c rabbitmq -- \ - curl -X POST "http://localhost:15672/api/queues/%2F/cifar10-rest-output/get" \ - --user "${RABBITMQ_USER}:${RABBITMQ_PASSWORD}" \ - -H "Content-type: application/json" \ - -H "Accept: application/json" \ - -d '{"count":1,"ackmode":"ack_requeue_false","encoding":"auto"}' | \ - jq -e -r '.[0].payload' | jq -r '.predictions[0][]' | xargs -I{} printf "%.2e," "{}") -} -with_backoff retrieveCifar10Result - -if [ "${EXPECTED_CIFAR10_RESULT_PAYLOAD}" != "${CIFAR10_RESULT_PAYLOAD}" ]; then - echo "UNEXPECTED CIFAR10 MODEL RESULT: ${CIFAR10_RESULT_PAYLOAD}" - exit 1 -fi +# +# Tensorflow model does not work as our RabbitMQ server only accepts payloads in Seldon format, not raw tensorflow +# +#EXPECTED_CIFAR10_RESULT_PAYLOAD='1.45e-08,1.25e-09,1.63e-07,1.15e-01,1.74e-07,6.19e-06,8.85e-01,6.07e-09,7.44e-08,4.73e-09,' +#CIFAR10_REQUEST_PAYLOAD="$(<$MODELS_DIR/cifar10_tensorflow_single.json)" +#echo ">>> Sending predict message to cifar10 rabbitmq model input queue..." +#kubectl -n rabbitmq exec rabbitmq-cluster-server-0 -c rabbitmq -- \ +# curl -X POST "http://localhost:15672/api/exchanges/%2F/amq.default/publish" \ +# --user "${RABBITMQ_USER}:${RABBITMQ_PASSWORD}" \ +# -H "Content-type: application/json" \ +# -H "Accept: application/json" \ +# -d "${CIFAR10_REQUEST_PAYLOAD}" +# +#function retrieveCifar10Result { +# CIFAR10_RESULT_PAYLOAD=$(kubectl -n rabbitmq exec rabbitmq-cluster-server-0 -c rabbitmq -- \ +# curl -X POST "http://localhost:15672/api/queues/%2F/cifar10-rest-output/get" \ +# --user "${RABBITMQ_USER}:${RABBITMQ_PASSWORD}" \ +# -H "Content-type: application/json" \ +# -H "Accept: application/json" \ +# -d '{"count":1,"ackmode":"ack_requeue_false","encoding":"auto"}' | \ +# jq -e -r '.[0].payload' | jq -r '.predictions[0][]' | xargs -I{} printf "%.2e," "{}") +#} +#with_backoff retrieveCifar10Result +# +#if [ "${EXPECTED_CIFAR10_RESULT_PAYLOAD}" != "${CIFAR10_RESULT_PAYLOAD}" ]; then +# echo "UNEXPECTED CIFAR10 MODEL RESULT: ${CIFAR10_RESULT_PAYLOAD}" +# exit 1 +#fi