Skip to content

Commit

Permalink
Update Keras model example and docs (#109)
Browse files Browse the repository at this point in the history
Signed-off-by: ted chang <htchang@us.ibm.com>
  • Loading branch information
tedhtchang authored Jan 19, 2022
1 parent a77e2a9 commit 5ca8841
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 10 deletions.
24 changes: 24 additions & 0 deletions config/example-predictors/example-keras-mnist-predictor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2022 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: serving.kserve.io/v1alpha1
kind: Predictor
metadata:
name: example-keras-mnist
spec:
modelType:
name: keras
path: keras/mnist.h5
storage:
s3:
secretKey: localMinIO
15 changes: 9 additions & 6 deletions config/runtimes/triton-2.x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ metadata:
maxLoadingConcurrency: "2"
spec:
supportedModelFormats:
- name: keras
version: "2" # 2.6.0
autoSelect: true
- name: onnx
version: "1" # 1.5.3
autoSelect: true
- name: pytorch
version: "1" # 1.8.0a0+17f8c32
autoSelect: true
- name: tensorflow
version: "1" # 1.15.4
autoSelect: true
Expand All @@ -30,12 +39,6 @@ spec:
- name: tensorrt
version: "7" # 7.2.1
autoSelect: true
- name: pytorch
version: "1" # 1.8.0a0+17f8c32
autoSelect: true
- name: onnx
version: "1" # 1.5.3
autoSelect: true

multiModel: true

Expand Down
2 changes: 1 addition & 1 deletion controllers/testdata/servingruntime_controller.golden
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ spec:
- name: MM_DEFAULT_VMODEL_OWNER
value: ksp
- name: MM_LABELS
value: mt:onnx,mt:onnx:1,mt:pytorch,mt:pytorch:1,mt:tensorflow,mt:tensorflow:1,mt:tensorflow:2,mt:tensorrt,mt:tensorrt:7,rt:triton-2.x
value: mt:keras,mt:keras:2,mt:onnx,mt:onnx:1,mt:pytorch,mt:pytorch:1,mt:tensorflow,mt:tensorflow:1,mt:tensorflow:2,mt:tensorrt,mt:tensorrt:7,rt:triton-2.x
- name: MM_TYPE_CONSTRAINTS_PATH
value: /etc/watson/mmesh/config/type_constraints
- name: MM_DATAPLANE_CONFIG_PATH
Expand Down
1 change: 1 addition & 0 deletions docs/model-types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

By leveraging existing third-party model servers, we support a number of standard ML model formats out-of-the box, with more to follow. Currently supported model types:

- [Keras](keras.md)
- [LightGBM](lightgbm.md)
- [ONNX](onnx.md)
- [PyTorch ScriptModule](pytorch.md)
Expand Down
6 changes: 3 additions & 3 deletions docs/model-types/keras.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ The following example is using the HDF5 file format, which typically uses a `.h5
**Storage Layout**

```
s3://modelmesh-serving-examples/tensorflow-model/keras-mnist
└── mnist.h5
s3://modelmesh-serving-examples/
└── keras-models/mnist.h5
```

**Predictor**
Expand All @@ -35,7 +35,7 @@ metadata:
spec:
modelType:
name: keras
path: tensorflow-model/keras-mnist/mnist.h5
path: keras-models/mnist.h5
storage:
s3:
secretKey: modelStorage
Expand Down

0 comments on commit 5ca8841

Please sign in to comment.