-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add doc for TF Serving #1165
Merged
Merged
Add doc for TF Serving #1165
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# TF Serving in Kubeflow | ||
|
||
Authors: | ||
|
||
- lunkai@google.com | ||
|
||
Status: | ||
|
||
- 2018-07-10 Created | ||
|
||
## TF Serving | ||
[Tensorflow Serving](https://github.com/tensorflow/serving) | ||
is a high-performance serving system for ML models. | ||
|
||
It provides gRPC [apis](https://github.com/tensorflow/serving/tree/master/tensorflow_serving/apis) | ||
for prediction and model service. | ||
|
||
Starting in TF 1.8, TF Serving also provides a REST [api](https://github.com/tensorflow/serving/blob/master/tensorflow_serving/g3doc/api_rest.md). | ||
|
||
## Kubeflow TF Serving component | ||
|
||
In Kubeflow, we have a TF Serving [component](https://github.com/kubeflow/kubeflow/tree/master/kubeflow/tf-serving). | ||
|
||
### HTTP proxy | ||
The [http proxy](https://github.com/kubeflow/kubeflow/tree/master/components/k8s-model-server/http-proxy) | ||
provides an REST api, which is the same as TF Serving's built-in REST api. | ||
|
||
We initially implemented this because TF Serving only supported gRPC api (until | ||
TF 1.8). Going forward, we will still maintain and support this http proxy as | ||
it has the ability to provide additional features such as: | ||
- exporting metrics, [kubeflow/kubeflow#1036](https://github.com/kubeflow/kubeflow/issues/1036). | ||
- request logging. See | ||
[kubeflow/kubeflow#1000](https://github.com/kubeflow/kubeflow/issues/1000) | ||
|
||
Users can choose between TF Serving's built-in http server or this http proxy. | ||
|
||
### TF serving images | ||
|
||
We build TF serving images for different TF versions, and for both cpu and gpu. | ||
For example, gcr.io/kubeflow-images-public/tensorflow-serving-1.6gpu:v20180604-0da89b8a. | ||
Check out gcr.io/kubeflow-images-public registry for other versions. | ||
|
||
### Monitoring | ||
|
||
Currently we can get rpc metrics (request count, error count, latencies) if we | ||
deploy [Istio](https://istio.io/). | ||
See [detail](https://github.com/kubeflow/kubeflow/blob/master/components/k8s-model-server/istio-integration.md). | ||
|
||
We are working on surfacing those metrics and other TF Serving specific metrics and integrating with Prometheus. | ||
See [kubeflow/kubeflow#1036](https://github.com/kubeflow/kubeflow/issues/1036). | ||
|
||
Also, there will be liveness and healthness check. See | ||
[issue](https://github.com/kubeflow/kubeflow/issues/368). | ||
|
||
## Usage | ||
To use the TF Serving component, see document [here](https://github.com/kubeflow/kubeflow/blob/master/components/k8s-model-server/README.md). | ||
|
||
## SeldonIO | ||
[SeldonIO](https://github.com/SeldonIO/seldon-core) is a platform for serving ML | ||
models. It's an open question how we should integrate TF Serving with | ||
Seldon to get nice features like routing and model management. | ||
|
||
## Next steps | ||
- [kubeflow/kubeflow#1000](https://github.com/kubeflow/kubeflow/issues/1000): Support logging request and response | ||
to enable continuous training and skew detection | ||
- [kubeflow/kubeflow#136](https://github.com/kubeflow/kubeflow/issues/136): Model management feature | ||
- [kubeflow/kubeflw#1004](https://github.com/kubeflow/kubeflow/issues/1004): Examples showcasing CUJ | ||
- [kubeflow/kubeflow#1219](https://github.com/kubeflow/kubeflow/issues/1219): Autoscaling | ||
- [kubeflow/kubebench#30](https://github.com/kubeflow/kubebench/issues/30): Benchmark to understand performance, like | ||
autoscaling. | ||
- [kubeflow/kubeflow#1036](https://github.com/kubeflow/kubeflow/issues/1036): metrics | ||
- Issues related to REST api: | ||
- Improve current http proxy [issue](https://github.com/kubeflow/kubeflow/issues/198) | ||
- Use the new TF Serving REST api [issue](https://github.com/kubeflow/kubeflow/issues/896) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we planning on doing request logging in the http proxy? Why can't we do that in TF Serving?
Would we have to also proxy gRPC requests in order to get that functionality when gRPC is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's easier to make progress if we do it in our http proxy comparing to TF serving.
We can discuss on this thread #1000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a link to the issue in the doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's there