Skip to content

Commit

Permalink
build new iris model as gs://seldon-models/v1.10.0-dev/sklearn/iris (…
Browse files Browse the repository at this point in the history
…and moviesentiment) (#3425)

* update sklearnservere

* update release.py

* update model uris in testing

* update model uris in notebooks

* update model uris in README.md

* update model uris in examples/streaming/knative-eventing/

* update model uris in examples/security

* update model uris in examples/iter8

* update model uris in examples/init_containers

* update model uris in examples/feedback

* update model uris in examples/batch

* update model uris in quickstart.md

* update model uris in doc/source/servers

* update model uris in rest of doc/source files

* add code that generates mlflow elasticnet_wine model

* fix operator upgrade tests

* add elasticnet_wine model update to release.py
  • Loading branch information
RafalSkolasinski authored Jul 27, 2021
1 parent 7d99f0f commit 224d060
Show file tree
Hide file tree
Showing 61 changed files with 5,376 additions and 176 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ We provide optimized model servers for some of the most popular Deep Learning an
You only have to upload your model binaries into your preferred object store, in this case we have a trained scikit-learn iris model in a Google bucket:

```console
gs://seldon-models/sklearn/iris/model.joblib
gs://seldon-models/v1.10.0-dev/sklearn/iris/model.joblib
```

Create a namespace to run your model in:
Expand All @@ -83,7 +83,7 @@ spec:
predictors:
- graph:
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
name: default
replicas: 1
Expand Down
2 changes: 1 addition & 1 deletion doc/source/graph/protocols.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
parameters:
- name: method
Expand Down
4 changes: 2 additions & 2 deletions doc/source/rollouts/abtests.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
traffic: 100
graph:
name: classifier
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
implementation: SKLEARN_SERVER
- name: candidate
traffic: 0
Expand Down Expand Up @@ -360,7 +360,7 @@ spec:
- name: default
graph:
name: classifier
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
implementation: SKLEARN_SERVER
```
Expand Down
2 changes: 1 addition & 1 deletion doc/source/servers/kfserving-storage-initializer.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ spec:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
serviceAccountName: user-gcp-sa
name: classifier
name: default
Expand Down
4 changes: 2 additions & 2 deletions doc/source/servers/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
graph:
name: classifier
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
```
By default only public models published to Google Cloud Storage will be accessible.
Expand Down Expand Up @@ -162,7 +162,7 @@ spec:
graph:
name: classifier
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
```

The image name and other details will be added when this is deployed automatically.
Expand Down
8 changes: 4 additions & 4 deletions doc/source/servers/sklearn.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
name: default
replicas: 1
Expand Down Expand Up @@ -68,7 +68,7 @@ spec:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
parameters:
- name: method
Expand Down Expand Up @@ -111,7 +111,7 @@ spec:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
parameters:
- name: method
Expand Down Expand Up @@ -159,7 +159,7 @@ spec:
graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
name: default
replicas: 1
Expand Down
16 changes: 8 additions & 8 deletions doc/source/workflow/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ Export your model binaries using the instructions provided in the requirements o

```python
>>my_sklearn_model.train(...)
>>pickle.dumps(my_sklearn_model, "model.pickle")
>>joblib.dump(my_sklearn_model, "model.joblib")

[Created file at /mypath/model.pickle]
[Created file at /mypath/model.joblib]
```

**2. Upload your model to an object store**
Expand All @@ -82,9 +82,9 @@ You can upload your models into any of the object stores supported by our pre-pa
For simplicity we have already uploaded it to the bucket so you can just proceed to the next step and run your model on Seldon Core.

```console
$ gsutil cp model.pickle gs://seldon-models/sklearn/iris/model.pickle
$ gsutil cp model.joblib gs://seldon-models/v1.10.0-dev/sklearn/iris/model.joblib

[ Saved into gs://seldon-models/sklearn/iris/model.pickle ]
[ Saved into gs://seldon-models/v1.10.0-dev/sklearn/iris/model.joblib ]
```

**3. Deploy to Seldon Core in Kubernetes**
Expand All @@ -103,7 +103,7 @@ spec:
predictors:
- graph:
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
name: default
replicas: 1
Expand Down Expand Up @@ -156,9 +156,9 @@ In this case we are also exporting the model binaries/artifacts, but we will be

```python
>> my_sklearn_model.train(...)
>> pickle.dumps(my_sklearn_model, "model.pickle")
>> joblib.dump(my_sklearn_model, "model.joblib")

[Created file at /mypath/model.pickle]
[Created file at /mypath/model.joblib]
```

**2. Create a wrapper class Model.py**
Expand All @@ -170,7 +170,7 @@ The python SDK also allows for other functions such as `load` for loading logic,
```python
class Model:
def __init__(self):
self._model = pickle.loads("model.pickle")
self._model = joblib.load("model.joblib")

def predict(self, X):
output = self._model(X)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ seldonDeployment:
# Prepackaged model server to use [see https://docs.seldon.io/projects/seldon-core/en/latest/servers/overview.html]
server: SKLEARN_SERVER
# The URL for the model that is to be used
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
# The number of seldon deployment replicas to launch
replicas: 2
# Waiting time before checks for deployment to ensure kubernetes cluster registers create
Expand Down
2 changes: 1 addition & 1 deletion examples/batch/hdfs-argo-workflows/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
logger:
mode: all
Expand Down
2 changes: 1 addition & 1 deletion examples/batch/hdfs-argo-workflows/hdfs-batch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
" - graph:\n",
" children: []\n",
" implementation: SKLEARN_SERVER\n",
" modelUri: gs://seldon-models/sklearn/iris\n",
" modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris\n",
" name: classifier\n",
" logger:\n",
" mode: all\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/batch/kubeflow-pipelines-batch/README.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
"def nlp_pipeline(\n",
" namespace=\"kubeflow\",\n",
" seldon_server=\"SKLEARN_SERVER\",\n",
" model_path=\"gs://seldon-models/sklearn/iris\",\n",
" model_path=\"gs://seldon-models/v1.10.0-dev/sklearn/iris\",\n",
" gateway_endpoint=\"istio-ingressgateway.istio-system.svc.cluster.local\",\n",
" retries=3,\n",
" replicas=10,\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/batch/kubeflow-pipelines-batch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ from kubernetes import client as k8s
def nlp_pipeline(
namespace="kubeflow",
seldon_server="SKLEARN_SERVER",
model_path="gs://seldon-models/sklearn/iris",
model_path="gs://seldon-models/v1.10.0-dev/sklearn/iris",
gateway_endpoint="istio-ingressgateway.istio-system.svc.cluster.local",
retries=3,
replicas=10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def nlp_pipeline(
namespace="kubeflow",
seldon_server="SKLEARN_SERVER",
model_path="gs://seldon-models/sklearn/iris",
model_path="gs://seldon-models/v1.10.0-dev/sklearn/iris",
gateway_endpoint="istio-ingressgateway.istio-system.svc.cluster.local",
retries=3,
replicas=10,
Expand Down
2 changes: 1 addition & 1 deletion examples/feedback/feedback-metrics-server/README.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
" - graph:\n",
" children: []\n",
" implementation: SKLEARN_SERVER\n",
" modelUri: gs://seldon-models/sklearn/iris\n",
" modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris\n",
" name: classifier\n",
" logger:\n",
" url: http://broker-ingress.knative-eventing.svc.cluster.local/seldon-logs/default\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/feedback/feedback-metrics-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ spec:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
logger:
url: http://broker-ingress.knative-eventing.svc.cluster.local/seldon-logs/default
Expand Down
2 changes: 1 addition & 1 deletion examples/feedback/metrics-server/README.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
" - graph:\n",
" children: []\n",
" implementation: SKLEARN_SERVER\n",
" modelUri: gs://seldon-models/sklearn/iris\n",
" modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris\n",
" name: classifier\n",
" logger:\n",
" url: http://seldon-multiclass-model-metrics.seldon.svc.cluster.local:80/\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/feedback/metrics-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
logger:
url: http://seldon-multiclass-model-metrics.seldon.svc.cluster.local:80/
Expand Down
6 changes: 3 additions & 3 deletions examples/init_containers/custom_init_container.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
" predictors:\n",
" - graph:\n",
" implementation: SKLEARN_SERVER\n",
" modelUri: gs://seldon-models/sklearn/iris\n",
" modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris\n",
" envSecretRefName: seldon-init-container-secret \n",
" name: classifier\n",
" name: default\n",
Expand Down Expand Up @@ -142,7 +142,7 @@
" image: gcr.io/kfserving/storage-initializer:v0.4.0\n",
" imagePullPolicy: IfNotPresent\n",
" args:\n",
" - gs://seldon-models/sklearn/iris\n",
" - gs://seldon-models/v1.10.0-dev/sklearn/iris\n",
" - /mnt/models\n",
"\n",
" envFrom:\n",
Expand All @@ -163,7 +163,7 @@
" graph:\n",
" children: []\n",
" implementation: SKLEARN_SERVER\n",
" modelUri: gs://seldon-models/sklearn/iris\n",
" modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris\n",
" name: classifier\n",
" name: default\n",
" replicas: 1\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
" - name: default\r\n",
" graph:\r\n",
" name: classifier\r\n",
" modelUri: gs://seldon-models/sklearn/iris\r\n",
" modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris\n",
" implementation: SKLEARN_SERVER\r\n"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ spec:
- name: default
graph:
name: classifier
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
implementation: SKLEARN_SERVER
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
" traffic: 100 \r\n",
" graph:\r\n",
" name: classifier\r\n",
" modelUri: gs://seldon-models/sklearn/iris\r\n",
" modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris\n",
" implementation: SKLEARN_SERVER\r\n",
" - name: candidate\r\n",
" traffic: 0\r\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/iter8/progressive_rollout/single_sdep/abtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
traffic: 100
graph:
name: classifier
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
implementation: SKLEARN_SERVER
- name: candidate
traffic: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ spec:
- name: default
graph:
name: classifier
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
implementation: SKLEARN_SERVER
6 changes: 3 additions & 3 deletions examples/security/ssl_requests/README.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
" - graph:\n",
" children: []\n",
" implementation: SKLEARN_SERVER\n",
" modelUri: gs://seldon-models/sklearn/iris\n",
" modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris\n",
" name: classifier\n",
" name: default\n",
" replicas: 1\n",
Expand Down Expand Up @@ -274,7 +274,7 @@
" - graph:\n",
" children: []\n",
" implementation: SKLEARN_SERVER\n",
" modelUri: gs://seldon-models/sklearn/iris\n",
" modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris\n",
" name: classifier\n",
" name: default\n",
" replicas: 1\n",
Expand Down Expand Up @@ -731,7 +731,7 @@
" - graph:\n",
" children: []\n",
" implementation: SKLEARN_SERVER\n",
" modelUri: gs://seldon-models/sklearn/iris\n",
" modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris\n",
" name: classifier\n",
" name: default\n",
" replicas: 1\n",
Expand Down
6 changes: 3 additions & 3 deletions examples/security/ssl_requests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ spec:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
name: default
replicas: 1
Expand All @@ -164,7 +164,7 @@ spec:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
name: default
replicas: 1
Expand Down Expand Up @@ -388,7 +388,7 @@ spec:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: classifier
name: default
replicas: 1
Expand Down
2 changes: 1 addition & 1 deletion examples/streaming/knative-eventing/README.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
" predictors:\n",
" - graph:\n",
" implementation: SKLEARN_SERVER\n",
" modelUri: gs://seldon-models/sklearn/iris\n",
" modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris\n",
" name: simple-iris-model\n",
" children: []\n",
" name: default\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/streaming/knative-eventing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
predictors:
- graph:
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
modelUri: gs://seldon-models/v1.10.0-dev/sklearn/iris
name: simple-iris-model
children: []
name: default
Expand Down
Loading

0 comments on commit 224d060

Please sign in to comment.