Skip to content

Commit

Permalink
Enable torchserve runtime
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael Vasquez <[email protected]>
  • Loading branch information
rafvasq committed Jan 23, 2023
1 parent a73852b commit b7b1434
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 72 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/run-fvt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
130 changes: 65 additions & 65 deletions fvt/predictor/predictor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit b7b1434

Please sign in to comment.