From b7b1434456d4af3bebb719facee172a3da2b1e07 Mon Sep 17 00:00:00 2001 From: Rafael Vasquez Date: Fri, 20 Jan 2023 12:18:28 -0500 Subject: [PATCH] Enable torchserve runtime Signed-off-by: Rafael Vasquez --- .github/workflows/run-fvt.yml | 15 ++-- fvt/predictor/predictor_test.go | 130 ++++++++++++++++---------------- 2 files changed, 73 insertions(+), 72 deletions(-) diff --git a/.github/workflows/run-fvt.yml b/.github/workflows/run-fvt.yml index bae0c6a87..bdaa9a575 100644 --- a/.github/workflows/run-fvt.yml +++ b/.github/workflows/run-fvt.yml @@ -41,16 +41,17 @@ jobs: sed -i 's/newTag:.*$/newTag: '"${{ env.IMAGE_TAG }}"'/' config/manager/kustomization.yaml sed -i '0,/cpu:.*$/s/cpu:.*$/cpu: 100m/' \ config/default/config-defaults.yaml \ - config/runtimes/mlserver-0.x.yaml \ - config/runtimes/triton-2.x.yaml \ - config/runtimes/ovms-1.x.yaml + # config/runtimes/mlserver-0.x.yaml \ + # config/runtimes/triton-2.x.yaml \ + # config/runtimes/ovms-1.x.yaml \ + config/runtimes/torchserve-0.x.yaml sed -i 's/memory:.*$/memory: 512Mi/g' \ - config/runtimes/mlserver-0.x.yaml \ - config/runtimes/triton-2.x.yaml \ - config/runtimes/ovms-1.x.yaml + # config/runtimes/mlserver-0.x.yaml \ + # config/runtimes/triton-2.x.yaml \ + # config/runtimes/ovms-1.x.yaml \ + config/runtimes/torchserve-0.x.yaml sed -i 's/maxSurge:.*$/maxSurge: 0/' config/internal/base/deployment.yaml.tmpl sed -i 's/maxUnavailable:.*$/maxUnavailable: 100%/' config/internal/base/deployment.yaml.tmpl - echo -e '\n disabled: true' >> config/runtimes/torchserve-0.x.yaml - name: Build Controller image run: | make build.develop diff --git a/fvt/predictor/predictor_test.go b/fvt/predictor/predictor_test.go index e6e54232d..a21972993 100644 --- a/fvt/predictor/predictor_test.go +++ b/fvt/predictor/predictor_test.go @@ -48,70 +48,70 @@ type FVTPredictor struct { // Array of all the predictors that need to be tested var predictorsArray = []FVTPredictor{ - { - predictorName: "tf", - predictorFilename: "tf-predictor.yaml", - currentModelPath: "fvt/tensorflow/mnist.savedmodel", - updatedModelPath: "fvt/tensorflow/mnist-dup.savedmodel", - differentPredictorName: "onnx", - differentPredictorFilename: "onnx-predictor.yaml", - }, - { - predictorName: "keras", - predictorFilename: "keras-predictor.yaml", - currentModelPath: "fvt/tensorflow/keras-mnist/mnist.h5", - updatedModelPath: "fvt/tensorflow/keras-mnistnew/mnist.h5", - differentPredictorName: "tf", - differentPredictorFilename: "tf-predictor.yaml", - }, - { - predictorName: "onnx", - predictorFilename: "onnx-predictor.yaml", - currentModelPath: "fvt/onnx/onnx-mnist", - updatedModelPath: "fvt/onnx/onnx-mnist-new", - differentPredictorName: "pytorch", - differentPredictorFilename: "pytorch-predictor.yaml", - }, - { - predictorName: "onnx-withschema", - predictorFilename: "onnx-predictor-withschema.yaml", - currentModelPath: "fvt/onnx/onnx-withschema", - updatedModelPath: "fvt/onnx/onnx-withschema-new", - differentPredictorName: "pytorch", - differentPredictorFilename: "pytorch-predictor.yaml", - }, - { - predictorName: "pytorch", - predictorFilename: "pytorch-predictor.yaml", - currentModelPath: "fvt/pytorch/pytorch-cifar", - updatedModelPath: "fvt/pytorch/pytorch-cifar-new", - differentPredictorName: "onnx", - differentPredictorFilename: "onnx-predictor.yaml", - }, - { - predictorName: "xgboost", - predictorFilename: "xgboost-predictor.yaml", - currentModelPath: "fvt/xgboost/mushroom", - updatedModelPath: "fvt/xgboost/mushroom-dup", - differentPredictorName: "onnx", - differentPredictorFilename: "onnx-predictor.yaml", - }, - { - predictorName: "lightgbm", - predictorFilename: "lightgbm-predictor.yaml", - currentModelPath: "fvt/lightgbm/mushroom", - updatedModelPath: "fvt/lightgbm/mushroom-dup", - differentPredictorName: "onnx", - differentPredictorFilename: "onnx-predictor.yaml", - }, - { - predictorName: "openvino", - predictorFilename: "openvino-mnist-predictor.yaml", - currentModelPath: "fvt/openvino/mnist", - updatedModelPath: "fvt/openvino/mnist-dup", - differentPredictorName: "xgboost", - differentPredictorFilename: "xgboost-predictor.yaml", - }, + // { + // predictorName: "tf", + // predictorFilename: "tf-predictor.yaml", + // currentModelPath: "fvt/tensorflow/mnist.savedmodel", + // updatedModelPath: "fvt/tensorflow/mnist-dup.savedmodel", + // differentPredictorName: "onnx", + // differentPredictorFilename: "onnx-predictor.yaml", + // }, + // { + // predictorName: "keras", + // predictorFilename: "keras-predictor.yaml", + // currentModelPath: "fvt/tensorflow/keras-mnist/mnist.h5", + // updatedModelPath: "fvt/tensorflow/keras-mnistnew/mnist.h5", + // differentPredictorName: "tf", + // differentPredictorFilename: "tf-predictor.yaml", + // }, + // { + // predictorName: "onnx", + // predictorFilename: "onnx-predictor.yaml", + // currentModelPath: "fvt/onnx/onnx-mnist", + // updatedModelPath: "fvt/onnx/onnx-mnist-new", + // differentPredictorName: "pytorch", + // differentPredictorFilename: "pytorch-predictor.yaml", + // }, + // { + // predictorName: "onnx-withschema", + // predictorFilename: "onnx-predictor-withschema.yaml", + // currentModelPath: "fvt/onnx/onnx-withschema", + // updatedModelPath: "fvt/onnx/onnx-withschema-new", + // differentPredictorName: "pytorch", + // differentPredictorFilename: "pytorch-predictor.yaml", + // }, + // { + // predictorName: "pytorch", + // predictorFilename: "pytorch-predictor.yaml", + // currentModelPath: "fvt/pytorch/pytorch-cifar", + // updatedModelPath: "fvt/pytorch/pytorch-cifar-new", + // differentPredictorName: "onnx", + // differentPredictorFilename: "onnx-predictor.yaml", + // }, + // { + // predictorName: "xgboost", + // predictorFilename: "xgboost-predictor.yaml", + // currentModelPath: "fvt/xgboost/mushroom", + // updatedModelPath: "fvt/xgboost/mushroom-dup", + // differentPredictorName: "onnx", + // differentPredictorFilename: "onnx-predictor.yaml", + // }, + // { + // predictorName: "lightgbm", + // predictorFilename: "lightgbm-predictor.yaml", + // currentModelPath: "fvt/lightgbm/mushroom", + // updatedModelPath: "fvt/lightgbm/mushroom-dup", + // differentPredictorName: "onnx", + // differentPredictorFilename: "onnx-predictor.yaml", + // }, + // { + // predictorName: "openvino", + // predictorFilename: "openvino-mnist-predictor.yaml", + // currentModelPath: "fvt/openvino/mnist", + // updatedModelPath: "fvt/openvino/mnist-dup", + // differentPredictorName: "xgboost", + // differentPredictorFilename: "xgboost-predictor.yaml", + // }, { predictorName: "pytorch-mar", predictorFilename: "pytorch-mar-predictor.yaml", @@ -584,7 +584,7 @@ var _ = Describe("Predictor", func() { }) }) - var _ = Describe("TorchServe Inference", Ordered, func() { + var _ = FDescribe("TorchServe Inference", Ordered, func() { var torchservePredictorObject *unstructured.Unstructured var torchservePredictorName string