Skip to content

Commit

Permalink
Merge pull request #778 from cliveseldon/small_fixes_0.3.2
Browse files Browse the repository at this point in the history
Docs for svc orchestrator
  • Loading branch information
ukclivecox authored Aug 9, 2019
2 parents 16e814d + a234b72 commit 6358aa2
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 38 deletions.
70 changes: 70 additions & 0 deletions doc/source/graph/svcorch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Service Orchestrator Engine

The service orchestrator is a component that is added to your inference graph to:

* Correctly manage the request/response paths described by your inference graph
* Expose prometheus metrics


## Resource Requests/Limits for Service Orchetsrator

You can set custom resource request and limits for this component by specifying them in a `svcOrchSpec` section in your Seldon Deployment. An example is shown below to set the engine cpu and memory requests:

```JSON
{
"apiVersion": "machinelearning.seldon.io/v1alpha2",
"kind": "SeldonDeployment",
"metadata": {
"name": "svcorch"
},
"spec": {
"name": "resources",
"predictors": [
{
"componentSpecs": [
{
"spec": {
"containers": [
{
"image": "seldonio/mock_classifier:1.0",
"name": "classifier"
}
]
}
}
],
"graph": {
"children": [],
"name": "classifier",
"type": "MODEL",
"endpoint": {
"type": "REST"
}
},
"svcOrchSpec": {
"resources": {
"requests": {
"cpu": "1",
"memory": "3Gi"
}
}
},
"name": "release-name",
"replicas": 1
}
]
}
}

```

### Java Settings

The service orchestrator is a Java component. You can directly control its java settings as describe [here](../graph/annotations.html#service-orchestrator)

## Environment Variables for Service Orchestrator

You can manipulate some of the functionality of the service orchestrator by adding specific environment variables to the `svcOrchSpec` section.

* [Configure Jaeger Tracing Example](../graph/distributed-tracing.html)
* [Set logging level in service orchestrator engine](../analytics/log_level.html#setting-log-level-in-the-seldon-engine)
5 changes: 3 additions & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ Seldon Core is an open source platform for deploying machine learning models on
Distributed Tracing <graph/distributed-tracing.md>
Annotation-based Configuration <graph/annotations.md>
Private Docker Registry <graph/private_registries.md>

Service Orchestrator <graph/svcorch.md>

.. toctree::
:maxdepth: 1
:caption: Ingress
Expand All @@ -80,7 +81,7 @@ Seldon Core is an open source platform for deploying machine learning models on
Helm Charts <graph/helm_charts.md>
Grafana Analytics <analytics/analytics.md>
Elastic Stack Logging <analytics/logging.md>
Autoscaling <graph/autoscaling.md>
Autoscaling <graph/autoscaling.md>

.. toctree::
:maxdepth: 1
Expand Down
77 changes: 41 additions & 36 deletions notebooks/helm_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
"output_type": "stream",
"text": [
"NAME: seldon-core\n",
"LAST DEPLOYED: Sat Jul 20 17:21:41 2019\n",
"LAST DEPLOYED: Fri Aug 9 16:53:58 2019\n",
"NAMESPACE: seldon-system\n",
"STATUS: DEPLOYED\n",
"\n",
Expand All @@ -176,21 +176,22 @@
"\n",
"==> v1/ConfigMap\n",
"NAME DATA AGE\n",
"seldon-config 1 0s\n",
"seldon-spartakus-config 1 0s\n",
"\n",
"==> v1/Pod(related)\n",
"NAME READY STATUS RESTARTS AGE\n",
"seldon-operator-controller-manager-0 0/1 ContainerCreating 0 0s\n",
"seldon-spartakus-volunteer-df68b9d48-979zh 0/1 ContainerCreating 0 0s\n",
"seldon-spartakus-volunteer-df68b9d48-pg7s5 0/1 ContainerCreating 0 0s\n",
"\n",
"==> v1/Secret\n",
"NAME TYPE DATA AGE\n",
"seldon-operator-webhook-server-secret Opaque 0 0s\n",
"\n",
"==> v1/Service\n",
"NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\n",
"seldon-operator-controller-manager-service ClusterIP 10.98.43.142 <none> 443/TCP 0s\n",
"webhook-server-service ClusterIP 10.104.0.59 <none> 443/TCP 0s\n",
"NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\n",
"seldon-operator-controller-manager-service ClusterIP 10.104.227.32 <none> 443/TCP 0s\n",
"webhook-server-service ClusterIP 10.100.75.232 <none> 443/TCP 0s\n",
"\n",
"==> v1/ServiceAccount\n",
"NAME SECRETS AGE\n",
Expand Down Expand Up @@ -265,7 +266,7 @@
"output_type": "stream",
"text": [
"NAME: ambassador\n",
"LAST DEPLOYED: Sat Jul 20 17:22:00 2019\n",
"LAST DEPLOYED: Fri Aug 9 16:54:15 2019\n",
"NAMESPACE: seldon\n",
"STATUS: DEPLOYED\n",
"\n",
Expand All @@ -276,14 +277,14 @@
"\n",
"==> v1/Pod(related)\n",
"NAME READY STATUS RESTARTS AGE\n",
"ambassador-778b689797-227sm 0/1 ContainerCreating 0 0s\n",
"ambassador-778b689797-lf847 0/1 ContainerCreating 0 0s\n",
"ambassador-778b689797-wq2zk 0/1 ContainerCreating 0 0s\n",
"ambassador-6d49d6b5c7-bvbm4 0/1 ContainerCreating 0 0s\n",
"ambassador-6d49d6b5c7-gzdlt 0/1 ContainerCreating 0 0s\n",
"ambassador-6d49d6b5c7-nc74z 0/1 ContainerCreating 0 0s\n",
"\n",
"==> v1/Service\n",
"NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\n",
"ambassador LoadBalancer 10.110.29.89 <pending> 80:32337/TCP,443:31543/TCP 0s\n",
"ambassador-admins ClusterIP 10.104.55.130 <none> 8877/TCP 0s\n",
"NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\n",
"ambassador LoadBalancer 10.106.248.204 <pending> 80:31591/TCP,443:31348/TCP 0s\n",
"ambassador-admins ClusterIP 10.109.24.215 <none> 8877/TCP 0s\n",
"\n",
"==> v1/ServiceAccount\n",
"NAME SECRETS AGE\n",
Expand All @@ -298,14 +299,17 @@
"ambassador 0s\n",
"\n",
"==> v1beta1/CustomResourceDefinition\n",
"NAME AGE\n",
"authservices.getambassador.io 0s\n",
"mappings.getambassador.io 0s\n",
"modules.getambassador.io 0s\n",
"ratelimitservices.getambassador.io 0s\n",
"tcpmappings.getambassador.io 0s\n",
"tlscontexts.getambassador.io 0s\n",
"tracingservices.getambassador.io 0s\n",
"NAME AGE\n",
"authservices.getambassador.io 0s\n",
"consulresolvers.getambassador.io 0s\n",
"kubernetesendpointresolvers.getambassador.io 0s\n",
"kubernetesserviceresolvers.getambassador.io 0s\n",
"mappings.getambassador.io 0s\n",
"modules.getambassador.io 0s\n",
"ratelimitservices.getambassador.io 0s\n",
"tcpmappings.getambassador.io 0s\n",
"tlscontexts.getambassador.io 0s\n",
"tracingservices.getambassador.io 0s\n",
"\n",
"\n",
"NOTES:\n",
Expand Down Expand Up @@ -372,22 +376,22 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"NAME: mymodel\n",
"LAST DEPLOYED: Sat Jul 20 18:11:38 2019\n",
"LAST DEPLOYED: Fri Aug 9 17:02:59 2019\n",
"NAMESPACE: seldon\n",
"STATUS: DEPLOYED\n",
"\n",
"RESOURCES:\n",
"==> v1alpha2/SeldonDeployment\n",
"NAME AGE\n",
"mymodel 1s\n",
"mymodel 0s\n",
"\n",
"\n"
]
Expand Down Expand Up @@ -464,14 +468,15 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"deployment \"mymodel-mymodel-7cd068f\" successfully rolled out\r\n"
"Waiting for deployment \"mymodel-mymodel-7cd068f\" rollout to finish: 0 of 1 updated replicas are available...\n",
"deployment \"mymodel-mymodel-7cd068f\" successfully rolled out\n"
]
}
],
Expand All @@ -488,12 +493,12 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"from seldon_core.seldon_client import SeldonClient\n",
"sc = SeldonClient(deployment_name=\"mymodel\",namespace=\"seldon\",gateway_endpoint=\"localhost:8003\",gateway=\"ambassador\")"
"sc = SeldonClient(deployment_name=\"svcorch\",namespace=\"seldon\",gateway_endpoint=\"localhost:8003\",gateway=\"ambassador\")"
]
},
{
Expand All @@ -505,7 +510,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 17,
"metadata": {},
"outputs": [
{
Expand All @@ -518,13 +523,13 @@
" tensor {\n",
" shape: 1\n",
" shape: 1\n",
" values: 0.7784058932896504\n",
" values: 0.8360570809602279\n",
" }\n",
"}\n",
"\n",
"Response:\n",
"meta {\n",
" puid: \"8l4dem4dik8rnfk3cuscfbe146\"\n",
" puid: \"vtkhutqqekn2b71evuq40if5ds\"\n",
" requestPath {\n",
" key: \"classifier\"\n",
" value: \"seldonio/mock_classifier:1.0\"\n",
Expand All @@ -535,7 +540,7 @@
" tensor {\n",
" shape: 1\n",
" shape: 1\n",
" values: 0.10543331585480226\n",
" values: 0.11099580112955368\n",
" }\n",
"}\n",
"\n"
Expand All @@ -556,7 +561,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 14,
"metadata": {
"scrolled": true
},
Expand All @@ -571,13 +576,13 @@
" tensor {\n",
" shape: 1\n",
" shape: 1\n",
" values: 0.6305579397781365\n",
" values: 0.11368719315764597\n",
" }\n",
"}\n",
"\n",
"Response:\n",
"meta {\n",
" puid: \"tuco33gp0he65oh36pq9cd5lie\"\n",
" puid: \"162o3utfp5rq903g0mm5r6ijf5\"\n",
" requestPath {\n",
" key: \"classifier\"\n",
" value: \"seldonio/mock_classifier:1.0\"\n",
Expand All @@ -588,7 +593,7 @@
" tensor {\n",
" shape: 1\n",
" shape: 1\n",
" values: 0.09227998331474725\n",
" values: 0.05716338296280312\n",
" }\n",
"}\n",
"\n"
Expand All @@ -602,7 +607,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 15,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit 6358aa2

Please sign in to comment.