Skip to content

Commit

Permalink
Changes for kfserving 0.4.1 (#4479)
Browse files Browse the repository at this point in the history
* Changes for kfserving 0.4.0

* update to kfserving==0.4.0

* Version 0.3.0 -> 0.4.0

* Update Dockerfile

* Update component.yaml

* Update components/kubeflow/kfserving/src/kfservingdeployer.py

Co-authored-by: Tommy Li <Tommy.chaoping.li@ibm.com>

* Update kfservingdeployer.py

Co-authored-by: Tommy Li <Tommy.chaoping.li@ibm.com>
  • Loading branch information
juliusvonkohout and Tomcli authored Feb 24, 2021
1 parent cd55a55 commit 65bed9b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion components/kubeflow/kfserving/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.6-slim

RUN pip3 install kubernetes==10.0.1 kfserving==0.3.0 requests==2.22.0 Flask==1.1.1 flask-cors==3.0.8
RUN pip3 install kubernetes==10.0.1 kfserving==0.4.1 requests==2.22.0 Flask==1.1.1 flask-cors==3.0.8

ENV APP_HOME /app
COPY src $APP_HOME
Expand Down
2 changes: 1 addition & 1 deletion components/kubeflow/kfserving/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ outputs:
- {name: Service Endpoint URI, type: String, description: 'URI of the deployed prediction service..'}
implementation:
container:
image: aipipeline/kfserving-component:v0.3.0
image: aipipeline/kfserving-component:v0.4.1
command: ['python']
args: [
-u, kfservingdeployer.py,
Expand Down
16 changes: 9 additions & 7 deletions components/kubeflow/kfserving/src/kfservingdeployer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from kfserving import V1alpha2SKLearnSpec
from kfserving import V1alpha2XGBoostSpec
from kfserving.models.v1alpha2_onnx_spec import V1alpha2ONNXSpec
from kfserving import V1alpha2TensorRTSpec
from kfserving import V1alpha2TritonSpec
from kfserving import V1alpha2CustomSpec
from kfserving import V1alpha2InferenceServiceSpec
from kfserving import V1alpha2InferenceService
Expand Down Expand Up @@ -79,11 +79,11 @@ def EndpointSpec(framework, storage_uri, service_account, min_replicas, max_repl
elif framework == "onnx":
endpointSpec.predictor.onnx = V1alpha2ONNXSpec(storage_uri=storage_uri)
return endpointSpec
elif framework == "tensorrt":
endpointSpec.predictor.tensorrt = V1alpha2TensorRTSpec(storage_uri=storage_uri)

elif framework == "triton":
endpointSpec.predictor.triton = V1alpha2TritonSpec(storage_uri=storage_uri)
return endpointSpec

else:
raise ("Error: No matching framework: " + framework)

Expand Down Expand Up @@ -429,12 +429,14 @@ def update(kfsvc, model_name, namespace):
exit(1)
try:
print(
model_status["status"]["url"] + " is the knative domain."
model_status["status"]["address"]["url"] + " is the knative domain."
)

print("Sample test commands: \n")
# model_status['status']['url'] is like http://flowers-sample.kubeflow.example.com/v1/models/flowers-sample

print(
"curl -v -X GET %s" % model_status["status"]["url"]
"curl -v -X GET %s" % model_status["status"]["address"]["url"]
)

print("\nIf the above URL is not accessible, it's recommended to setup Knative with a configured DNS.\n"\
Expand Down

0 comments on commit 65bed9b

Please sign in to comment.