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

SSL for Seldon Python Client #709

Merged
merged 2 commits into from
Jul 21, 2019
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
2 changes: 1 addition & 1 deletion doc/source/examples/alibaba_aks_deep_mnist.nblink
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"path": "../../../examples/models/alibaba_aks_deep_mnist/alibaba_cloud_aks_deep_mnist.ipynb"
"path": "../../../examples/models/alibaba_aks_deep_mnist/alibaba_cloud_ack_deep_mnist.ipynb"
}
3 changes: 3 additions & 0 deletions doc/source/examples/seldon_client.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../../../notebooks/seldon_client.ipynb"
}
1 change: 1 addition & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Seldon Core is an open source platform for deploying machine learning models on
:maxdepth: 1
:caption: Reference

Python API reference <python/api/modules>
Seldon Microservice API <reference/apis/internal-api.md>
Seldon Orchestrator <reference/engine>
Benchmarking <reference/benchmarking.md>
Expand Down
1 change: 1 addition & 0 deletions doc/source/python/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ Python
Seldon Core Python Module <python_module.md>
Your python class <python_component.md>
Wrap using S2I <python_wrapping_s2i.md> or Docker <python_wrapping_docker.md>
Seldon Python Client <seldon_client.md>
Python API reference <api/modules>

34 changes: 34 additions & 0 deletions doc/source/python/seldon_client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Seldon Python Client

We provide an example python client for calling the API using REST or gRPC for internal mciroservice testing or for calling the public external API.

Examples of its use can be found in various notebooks:

* [Helm based deployment examples](../examples/helm_examples.html)
* [Istio examples](../examples/istio_examples.html)

To use the client simply create an instance with settings for your use case, for example:

```
from seldon_core.seldon_client import SeldonClient
sc = SeldonClient(deployment_name="mymodel",namespace="seldon",gateway_endpoint="localhost:8003",gateway="ambassador")
```

In the above we set our deployment_name to "mymodel" and the namespace to "seldon". For the full set of parameters see [here](api/seldon_core.html#seldon_core.seldon_client.SeldonClient)

To make a REST call with a random payload:

```
r = sc.predict(transport="rest")
```

To make a gRPC call with random payload:

```
r = sc.predict(transport="grpc")
```


## Advanced Examples

* [SSL and Authentication](../examples/seldon_client.html)
Loading