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

add overview docs #87

Merged
merged 1 commit into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 5 additions & 2 deletions docs/examples/intro/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ This notebook will walk you through an end-to-end example deploying a Tempo pipe

## Prerequisites

* rclone and conda installed.
* Run this notebook within the `seldon-examples` conda environment. Details to create this can be found [here]().
This notebooks needs to be run in the `tempo-examples` conda environment defined below. Create from project root folder:

```bash
conda env create --name tempo-examples --file conda/tempo-examples.yaml
```

## Architecture

Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Tempo
:caption: Documentation:

Quickstart <overview/quickstart.md>
Architecture <overview/architecture.md>

.. toctree::
:titlesonly:
Expand Down
47 changes: 47 additions & 0 deletions docs/overview/architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Architecture

Overview of Tempo architecture.

![internals](internals.png)


## Model and Pipeline

A Model is the core deployment artifact in tempo and describes the link to a saved machine learning component. A Pipeline is a custom python orchestrator that references other Tempo models or pipelines specied in its definition.

![model-pipeline](model-pipeline.png)


A Model can be:

* An optimized prepackaged server running a model artifact created by the data scientist, e.g. a Tnesorflow model.
* Custom python code (defined via a class or function).


A Pipeline is custom python code (defined via a class or function) which references other Tempo components as callabale functions.

An example is shown below for the outlier demo. There we have a Pipeline which calls the outlier model and if the request is determined to be an outlier then the processing is halted otherwise the model is called.

![outlier demo](outlier-demo.png)

## Runtimes

Runtimes provide the core functionality to deploy a Tempo model to an infrastructure platform.

Read more about [Tempo Runtimes](./runtimes.html)


## Protocols

Models when deployed will expose endpoints that respect a particular protocol. The available protocols in Tempo are shown below.

| Protocol | Description |
|--------|---------|
| KFServingV2Protocol | [V2 definition](https://github.com/kubeflow/kfserving/tree/master/docs/predict-api/v2) |
| KFServingV1Protocol | [Tensorflow protocol](https://github.com/tensorflow/serving/blob/master/tensorflow_serving/g3doc/api_rest.md) |
| SeldonProtocol | [Seldon protcol definition](https://docs.seldon.io/projects/seldon-core/en/latest/graph/protocols.html#rest-and-grpc-seldon-protocol) |


The default protocol is KFServingV2 protocol.

If calling the model with tempo you will not need to deal with the protocol explicitly as translation from the defined python types to runtime payloads and vice versa will be automatic.
Binary file added docs/overview/internals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/overview/model-pipeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/overview/outlier-demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/overview/runtimes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Runtimes

Tempo runtimes provide the core functionality to deploy a tempo Model. They must provide concrete implementations for the following functionality:

| Method | Action |
|--------|---------|
| deploy | deploy a model |
| undeploy | undeploy a model |
| wait_ready | wait for a deployed model to be ready |
| get_endpoint | get the URL for the deployed model so it can be called |
| to_k8s_yaml | optionally get the Kubernetes declarative yaml for the model |

The Runtimes defined within Tempo are:

| Runtime | Infrastructure Target | Example |
| ------- | --------------------- | -------- |
| SeldonDockerRuntime | deploy Tempo models to Docker | [intro](../examples/intro/local.html) |
| SeldonKubernetesRuntime | deploy Tempo models to a Kubernetes cluster with Seldon Core installed | [intro_k8s](../examples/intro/k8s.html) |
| KFServingKubernetesRuntime | deploy Tempo models to a Kubernetes cluster with KFServing installed | [intro](../examples/kfserving/README.html) |
| SeldonDeployRuntime | deploy Tempo models to a Kubernetes cluster with Seldon Deploy installed | |