Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for kfserving 0.4.1 #4479

Merged
merged 9 commits into from
Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
23 changes: 16 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,21 @@ 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: ")
juliusvonkohout marked this conversation as resolved.
Show resolved Hide resolved
print(
"# Note: If Istio Ingress gateway is not served with LoadBalancer, use $CLUSTER_NODE_IP:31380 as the ISTIO_INGRESS_ENDPOINT"
)
print(
"ISTIO_INGRESS_ENDPOINT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')"
)
print("Sample test commands: \n")
# model_status['status']['url'] is like http://flowers-sample.kubeflow.example.com/v1/models/flowers-sample

host, path = url.sub("", model_status["status"]["address"]["url"]).split("/", 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few weeks ago, we discovered that this split command may not work with some DNS for OpenShift route. So we removed it to avoid any confusion and error.

print(
"curl -v -X GET %s" % model_status["status"]["url"]
'curl -X GET -H "Host: ' + host + '" http://$ISTIO_INGRESS_ENDPOINT/' + path
juliusvonkohout marked this conversation as resolved.
Show resolved Hide resolved
)

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