Configurable timeouts
Prerequisites
Kubernetes cluster with kubectl authorized
curl and grpcurl installed
Setup Seldon Core
Use the setup notebook to Setup Cluster to setup Seldon Core with an ingress - either Ambassador or Istio.
Then port-forward to that ingress on localhost:8003 in a separate terminal either with:
Ambassador:
kubectl port-forward $(kubectl get pods -n seldon -l app.kubernetes.io/name=ambassador -o jsonpath='{.items[0].metadata.name}') -n seldon 8003:8080Istio:
kubectl port-forward $(kubectl get pods -l istio=ingressgateway -n istio-system -o jsonpath='{.items[0].metadata.name}') -n istio-system 8003:8080
!kubectl create namespace seldon!kubectl config set-context $(kubectl config current-context) --namespace=seldonfrom IPython.core.magic import register_line_cell_magic
@register_line_cell_magic
def writetemplate(line, cell):
print("writing template")
with open(line, "w") as f:
f.write(cell.format(**globals()))Configure Istio
For this example we will create the default istio gateway for seldon which needs to be called seldon-gateway. You can supply your own gateway by adding to your SeldonDeployments resources the annotation seldon.io/istio-gateway with values the name of your istio gateway.
Short timeouts deployment file
Below is the outputs of the Seldon config file required to set custom timeouts.
First we'll show how we can set a short lived example by setting the "seldon.io/rest-timeout":"1000" annotation with a fake model that delays for 30 secs.
We can then apply this Seldon Deployment file we defined above in the seldon namespace.
And wait until the resource runs correctly.
Delete this graph and recreate one with a longer timeout
Seldon Deployment with Long Timeout
Now we can have a look at how we can set a deployment with a longer timeout.
And we can apply it to deploy the model with long timeouts.
This next request will work given that the timeout is much longer.
Last updated
Was this helpful?