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

Extend KFServing component with autoscaling and server mode #2315

Merged
merged 5 commits into from
Oct 7, 2019

Conversation

Tomcli
Copy link
Member

@Tomcli Tomcli commented Oct 4, 2019

Extend KFServing component with the following features:

  • Add autoscaling annotations
  • Add server mode to accept external requests for model serving.
  • minor code refactor

/assign @animeshsingh


This change is Reviewable

@@ -1,6 +1,6 @@
FROM python:3.6-slim

RUN pip install kubernetes==9.0.0 kfserving==0.1.1 requests==2.22.0
RUN pip install kubernetes==9.0.0 kfserving==0.1.1 requests==2.22.0 Flask==1.1.1 flask-cors==3.0.8
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit. It's a good habit to use pip3, since some images have pip pointing to python2.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks. Done.

components/kubeflow/kfserving/component.yaml Outdated Show resolved Hide resolved
components/kubeflow/kfserving/component.yaml Outdated Show resolved Hide resolved
)
print(model_status)
try:
print(model_status['status']['url'] + ' is the knative domain header. $CLUSTER_IP:31380 is the endpoint to post predictions to the model.')
Copy link
Contributor

Choose a reason for hiding this comment

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

why 31830 is hardcoded?

Copy link
Member Author

Choose a reason for hiding this comment

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

The default istio ingress gateway is hosted with nodePort 31380. I updated this section with some bash command to get the LoadBalancer IP to make it more clarify.

print(model_status['status']['url'] + ' is the knative domain header. $CLUSTER_IP:31380 is the endpoint to post predictions to the model.')
print('Sample test curl below: ')
print('curl -X GET -H "Host: ' + url.sub('', model_status['status']['url']) + '" $CLUSTER_IP:31380')
except:
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here?

@@ -28,7 +28,11 @@ def kfservingPipeline(
canary_model_uri='gs://kfserving-samples/models/tensorflow/flowers',
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest removing this file. We will come up with a sample later in samples repo imho

@animeshsingh
Copy link
Contributor

/lgtm

@@ -8,13 +8,15 @@ inputs:
- {name: Canary Model Traffic Percentage, type: String, default: '0', description: 'Optional Traffic to be sent to default model'}
- {name: Namespace, type: String, default: 'kubeflow', description: 'Kubernetes namespace where the KFServing service is deployed.'}
- {name: Framework, type: String, default: 'tensorflow', description: 'Machine Learning Framework for Model Serving.'}
- {name: default_custom_model_spec, type: String, default: '{}', description: 'Custom runtime default custom model container spec.'}
- {name: canary_custom_model_spec, type: String, default: '{}', description: 'Custom runtime canary custom model container spec.'}
- {name: Default Custom Model Spec, type: String, default: '{}', description: 'Custom runtime default custom model container spec.'}
Copy link
Contributor

Choose a reason for hiding this comment

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

JFYI: If you use type: JsonObject, then the argument to this input will be automatically JSON-serialized.
e.g. kfserve_op(..., spec={'model_version': 1.7}), ....

@Ark-kun
Copy link
Contributor

Ark-kun commented Oct 7, 2019

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Ark-kun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 4f65528 into kubeflow:master Oct 7, 2019
magdalenakuhn17 pushed a commit to magdalenakuhn17/pipelines that referenced this pull request Oct 22, 2023
These updates coincide with MM 0.9 release.

Signed-off-by: Paul Van Eck <pvaneck@us.ibm.com>
@Tomcli Tomcli deleted the kfs-patch branch February 28, 2024 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants