diff --git a/.gitignore b/.gitignore index a5e66818..9da8cc76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ # general .env +.DS_Store +.run/ +temp/ public/ target/ @@ -30,7 +33,7 @@ bin .vscode *~ -# Modelmesh development related artifacts +# ModelMesh development related artifacts devbuild .develop_image_name .dev/ diff --git a/controllers/modelmesh/modelmesh.go b/controllers/modelmesh/modelmesh.go index 2a8dd1b2..cf136a7d 100644 --- a/controllers/modelmesh/modelmesh.go +++ b/controllers/modelmesh/modelmesh.go @@ -261,29 +261,30 @@ func (m *Deployment) addMMEnvVars(deployment *appsv1.Deployment) error { } if m.EnableAccessLogging { - // See https://github.com/kserve/modelmesh/blob/v0.11.0/src/main/java/com/ibm/watson/modelmesh/ModelMeshEnvVars.java#L55 + // See https://github.com/kserve/modelmesh/blob/v0.11.1/src/main/java/com/ibm/watson/modelmesh/ModelMeshEnvVars.java#L55 if err := setEnvironmentVar(ModelMeshContainerName, "MM_LOG_EACH_INVOKE", "true", deployment); err != nil { return err } } if m.GrpcMaxMessageSize > 0 { - // See https://github.com/kserve/modelmesh/blob/v0.11.0/src/main/java/com/ibm/watson/modelmesh/ModelMeshEnvVars.java#L38 + // See https://github.com/kserve/modelmesh/blob/v0.11.1/src/main/java/com/ibm/watson/modelmesh/ModelMeshEnvVars.java#L38 if err := setEnvironmentVar(ModelMeshContainerName, "MM_SVC_GRPC_MAX_MSG_SIZE", strconv.Itoa(m.GrpcMaxMessageSize), deployment); err != nil { return err } } - // See https://github.com/kserve/modelmesh/blob/v0.11.0/src/main/java/com/ibm/watson/modelmesh/ModelMeshEnvVars.java#L31 + // See https://github.com/kserve/modelmesh/blob/v0.11.1/src/main/java/com/ibm/watson/modelmesh/ModelMeshEnvVars.java#L31 if err := setEnvironmentVar(ModelMeshContainerName, "MM_KVSTORE_PREFIX", ModelMeshEtcdPrefix, deployment); err != nil { return err } - // See https://github.com/kserve/modelmesh/blob/v0.11.0/src/main/java/com/ibm/watson/modelmesh/ModelMeshEnvVars.java#L68 + // See https://github.com/kserve/modelmesh/blob/v0.11.1/src/main/java/com/ibm/watson/modelmesh/ModelMeshEnvVars.java#L68 if err := setEnvironmentVar(ModelMeshContainerName, "MM_DEFAULT_VMODEL_OWNER", m.DefaultVModelOwner, deployment); err != nil { return err } if len(m.PayloadProcessors) > 0 { + // See https://github.com/kserve/modelmesh/blob/v0.11.1/src/main/java/com/ibm/watson/modelmesh/ModelMeshEnvVars.java#L26 if err := setEnvironmentVar(ModelMeshContainerName, "MM_PAYLOAD_PROCESSORS", m.PayloadProcessors, deployment); err != nil { return err } diff --git a/docs/model-formats/openvino-ir.md b/docs/model-formats/openvino-ir.md index 17ff30a6..12ebb128 100644 --- a/docs/model-formats/openvino-ir.md +++ b/docs/model-formats/openvino-ir.md @@ -2,13 +2,13 @@ ## Format -Full documentation on OpenVINO IR format can be found [here](https://docs.openvino.ai/2022.1/openvino_docs_MO_DG_IR_and_opsets.html#intermediate-representation-used-in-openvino). +Full documentation on OpenVINO IR format can be found [here](https://docs.openvino.ai/2022.3/openvino_docs_MO_DG_IR_and_opsets.html#intermediate-representation-used-in-openvino). OpenVINO™ toolkit introduces its own format of graph representation and its own operation set. A graph is represented with two files: an XML file and a binary file. This representation is commonly referred to as the Intermediate Representation or IR. -An example of a small IR XML file can be found in the same [link above](https://docs.openvino.ai/2022.1/openvino_docs_MO_DG_IR_and_opsets.html#intermediate-representation-used-in-openvino). The XML file doesn’t have big constant values, like convolution weights. Instead, it refers to a part of the accompanying binary file that stores such values in a binary format. +An example of a small IR XML file can be found in the same [link above](https://docs.openvino.ai/2022.3/openvino_docs_MO_DG_IR_and_opsets.html#intermediate-representation-used-in-openvino). The XML file doesn’t have big constant values, like convolution weights. Instead, it refers to a part of the accompanying binary file that stores such values in a binary format. -Models trained in other formats (Caffe, TensorFlow, MXNet, PaddlePaddle and ONNX) can be converted to OpenVINO IR format. To do so, use OpenVINO’s [Model Optimizer](https://docs.openvino.ai/2022.1/openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html). +Models trained in other formats (Caffe, TensorFlow, MXNet, PaddlePaddle and ONNX) can be converted to OpenVINO IR format. To do so, use OpenVINO’s [Model Optimizer](https://docs.openvino.ai/2022.3/openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html). ## Configuration @@ -20,7 +20,7 @@ Here is an example of client code: input_tensorname = 'input' request.inputs[input_tensorname].CopyFrom(make_tensor_proto(img, shape=(1, 3, 224, 224))) -..... +... output_tensorname = 'resnet_v1_50/predictions/Reshape_1' predictions = make_ndarray(result.outputs[output_tensorname]) @@ -46,21 +46,22 @@ More details on model configuration can be found [here](https://docs.openvino.ai The OpenVINO models need to be placed and mounted in a particular directory structure: -``` +```shell tree models/ + models/ ├── model1 -│   ├── 1 -│   │   ├── ir_model.bin -│   │   └── ir_model.xml -│   └── 2 -│   ├── ir_model.bin -│   └── ir_model.xml +│ ├── 1 +│ │ ├── ir_model.bin +│ │ └── ir_model.xml +│ └── 2 +│ ├── ir_model.bin +│ └── ir_model.xml └── model2 -│   └── 1 -│      ├── ir_model.bin -│      ├── ir_model.xml -│      └── mapping_config.json +│ └── 1 +│ ├── ir_model.bin +│ ├── ir_model.xml +│ └── mapping_config.json └── model3 └── 1 └── model.onnx diff --git a/docs/predictors/run-inference.md b/docs/predictors/run-inference.md index 7f9f2ee4..8e018575 100644 --- a/docs/predictors/run-inference.md +++ b/docs/predictors/run-inference.md @@ -190,7 +190,7 @@ This would give a response similar to the following: { "name": "predict", "datatype": "FP32", - "shape": [1], + "shape": [1, 1], "data": [8] } ] diff --git a/docs/predictors/setup-storage.md b/docs/predictors/setup-storage.md index 55630d00..d7a07c0e 100644 --- a/docs/predictors/setup-storage.md +++ b/docs/predictors/setup-storage.md @@ -105,7 +105,7 @@ Models can be stored on [Kubernetes Persistent Volumes](https://kubernetes.io/do There are two ways to enable PVC support in ModelMesh: 1. The Persistent Volume Claims can be added in the `storage-config` secret. This way all PVCs will be mounted to all serving runtime pods. -2. The `allowAnyPVC` configuration flag can be set to `true`. This way the Modelmesh controller will dynamically mount the PVC to a runtime pod at the time a predictor or inference service requiring it is being deployed. +2. The `allowAnyPVC` configuration flag can be set to `true`. This way the ModelMesh controller will dynamically mount the PVC to a runtime pod at the time a predictor or inference service requiring it is being deployed. Follow the example instructions below to create a PVC, store a model on it, and configure ModelMesh to mount the PVC to the runtime serving pods so that the model can be loaded for inferencing. @@ -230,7 +230,7 @@ As an alternative to preconfiguring all _allowed_ PVCs in the `storage-config` s Let's update (or create) the `model-serving-config` ConfigMap. -Note, if you already have a `model-serving-config` ConfigMap, you might want to retain the existing config overrides. You can check your current configuration flags by running: +**Note**, if you already have a `model-serving-config` ConfigMap, you might want to retain the existing config overrides. You can check your current configuration flags by running: ```shell kubectl get cm "model-serving-config" -o jsonpath="{.data['config\.yaml']}"` @@ -319,7 +319,7 @@ The response should look like the following: { "model_name": "sklearn-pvc-example__isvc-3d2daa3370", "outputs": [ - {"name": "predict", "datatype": "INT64", "shape": [1], "data": [8]} + {"name": "predict", "datatype": "INT64", "shape": [1, 1], "data": [8]} ] } ``` diff --git a/docs/quickstart.md b/docs/quickstart.md index 585e3b21..75042dd6 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -87,6 +87,7 @@ Here, we deploy an SKLearn MNIST model which is served from the local MinIO cont ```shell kubectl apply -f - <