Skip to content

Commit

Permalink
Add ssl_verify_path for explainer TLS (#495)
Browse files Browse the repository at this point in the history
* revert REQUESTS_CA_BUNDLE

* add ssl_verify_path to mlserver explainer settings

* MLServer dev7 update
  • Loading branch information
ukclivecox authored Oct 14, 2022
1 parent e12f681 commit feaf14d
Show file tree
Hide file tree
Showing 23 changed files with 117 additions and 100 deletions.
2 changes: 1 addition & 1 deletion docs/source/contents/getting-started/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Seldon Core V2 can be managed via a CLI tool.

Download from a recent release from https://github.com/SeldonIO/seldon-core-v2/releases.

It is dynamically linked and will require and nix architetcure and glibc 2.25+.
It is dynamically linked and will require and *nix architecture and glibc 2.25+.

```
mv seldon-linux-amd64 seldon
Expand Down
2 changes: 1 addition & 1 deletion k8s/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PIPELINEGATEWAY_IMG ?= ${DOCKERHUB_USERNAME}/seldon-pipelinegateway:${CUSTOM_IMA
RCLONE_IMG ?= ${DOCKERHUB_USERNAME}/seldon-rclone:${CUSTOM_IMAGE_TAG}
SCHEDULER_IMG ?= ${DOCKERHUB_USERNAME}/seldon-scheduler:${CUSTOM_IMAGE_TAG}

MLSERVER_IMG ?= seldonio/mlserver:1.2.0.dev5
MLSERVER_IMG ?= seldonio/mlserver:1.2.0.dev7
TRITON_IMG ?= nvcr.io/nvidia/tritonserver:22.05-py3

.PHONY: create
Expand Down
2 changes: 1 addition & 1 deletion k8s/yaml/seldon-v2-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ spec:
value: "1"
- name: MLSERVER_LOAD_MODELS_AT_STARTUP
value: "false"
image: seldonio/mlserver:1.2.0.dev5
image: seldonio/mlserver:1.2.0.dev7
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
Expand Down
2 changes: 1 addition & 1 deletion operator/config/serverconfigs/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ images:
newTag: latest
- name: mlserver
newName: seldonio/mlserver
newTag: 1.2.0.dev5
newTag: 1.2.0.dev7
- name: rclone
newName: seldonio/seldon-rclone
newTag: latest
Expand Down
5 changes: 0 additions & 5 deletions samples/examples/income_classifier/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
classifier/
preprocessor/
drift-detector/
outlier-detector/
explainer/
infer-data/
1 change: 1 addition & 0 deletions samples/examples/income_classifier/classifier/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
model.joblib
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "income",
"implementation": "mlserver_sklearn.SKLearnModel",
"parameters": {
"version": "v0.1.0"
}
}
2 changes: 2 additions & 0 deletions samples/examples/income_classifier/drift-detector/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config.toml
x_ref.npy
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "income-drift",
"implementation": "mlserver_alibi_detect.AlibiDetectRuntime",
"parameters": {
"uri": "./",
"version": "v0.1.0"
}
}
1 change: 1 addition & 0 deletions samples/examples/income_classifier/explainer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "anchor-tabular-income",
"implementation": "mlserver_alibi_explain.AlibiExplainRuntime",
"parallel_workers": 0,
"parameters": {
"uri": "./data",
"version": "v0.1.0"
}
}
16 changes: 8 additions & 8 deletions samples/examples/income_classifier/infer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
" {\r\n",
" \"pipeline\": {\r\n",
" \"name\": \"income-production\",\r\n",
" \"uid\": \"ccss58q4u1vus3q1e1ig\",\r\n",
" \"uid\": \"cd4lg2qivs0nm83cjb60\",\r\n",
" \"version\": 1,\r\n",
" \"steps\": [\r\n",
" {\r\n",
Expand Down Expand Up @@ -291,7 +291,7 @@
" \"pipelineVersion\": 1,\r\n",
" \"status\": \"PipelineReady\",\r\n",
" \"reason\": \"created pipeline\",\r\n",
" \"lastChangeTimestamp\": \"2022-10-02T16:56:03.396751091Z\"\r\n",
" \"lastChangeTimestamp\": \"2022-10-14T12:37:32.526902569Z\"\r\n",
" }\r\n",
" }\r\n",
" ]\r\n",
Expand Down Expand Up @@ -343,7 +343,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"seldon.default.model.income-drift.outputs\tccss59patu79k6fs0pjg\t{\"name\":\"is_drift\",\"datatype\":\"INT64\",\"shape\":[\"1\"],\"contents\":{\"int64Contents\":[\"0\"]}}\r\n"
"seldon.default.model.income-drift.outputs\tcd4lg40n3m56u1qgegr0\t{\"name\":\"is_drift\",\"datatype\":\"INT64\",\"shape\":[\"1\"],\"contents\":{\"int64Contents\":[\"0\"]}}\r\n"
]
}
],
Expand Down Expand Up @@ -391,7 +391,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"seldon.default.model.income-drift.outputs\tccss5dpatu79k6fs0pk0\t{\"name\":\"is_drift\",\"datatype\":\"INT64\",\"shape\":[\"1\"],\"contents\":{\"int64Contents\":[\"1\"]}}\r\n"
"seldon.default.model.income-drift.outputs\tcd4lg6on3m56u1qgegrg\t{\"name\":\"is_drift\",\"datatype\":\"INT64\",\"shape\":[\"1\"],\"contents\":{\"int64Contents\":[\"1\"]}}\r\n"
]
}
],
Expand Down Expand Up @@ -419,7 +419,7 @@
"text": [
"[0 0 1 1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 1]\n",
"<Response [200]>\n",
"{'model_name': '', 'outputs': [{'data': [0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1], 'name': 'predict', 'shape': [20], 'datatype': 'INT64'}, {'data': [1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1], 'name': 'is_outlier', 'shape': [1, 20], 'datatype': 'INT64'}]}\n"
"{'model_name': '', 'outputs': [{'data': [0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1], 'name': 'predict', 'shape': [20], 'datatype': 'INT64'}, {'data': [1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1], 'name': 'is_outlier', 'shape': [1, 20], 'datatype': 'INT64'}]}\n"
]
}
],
Expand All @@ -439,7 +439,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"seldon.default.model.income-drift.outputs\tccss5ghatu79k6fs0pkg\t{\"name\":\"is_drift\",\"datatype\":\"INT64\",\"shape\":[\"1\"],\"contents\":{\"int64Contents\":[\"0\"]}}\r\n"
"seldon.default.model.income-drift.outputs\tcd4lg88n3m56u1qgegs0\t{\"name\":\"is_drift\",\"datatype\":\"INT64\",\"shape\":[\"1\"],\"contents\":{\"int64Contents\":[\"0\"]}}\r\n"
]
}
],
Expand Down Expand Up @@ -529,7 +529,7 @@
"text": [
"[0]\n",
"<Response [200]>\n",
"{'model_name': 'income-explainer_1', 'model_version': '1', 'id': '4e5362b0-e2c7-41e0-82d5-f1a240f60834', 'parameters': {'content_type': None, 'headers': None}, 'outputs': [{'name': 'explanation', 'shape': [1], 'datatype': 'BYTES', 'parameters': {'content_type': 'str', 'headers': None}, 'data': ['{\"meta\": {\"name\": \"AnchorTabular\", \"type\": [\"blackbox\"], \"explanations\": [\"local\"], \"params\": {\"seed\": 1, \"disc_perc\": [25, 50, 75], \"threshold\": 0.95, \"delta\": 0.1, \"tau\": 0.15, \"batch_size\": 100, \"coverage_samples\": 10000, \"beam_size\": 1, \"stop_on_first\": false, \"max_anchor_size\": null, \"min_samples_start\": 100, \"n_covered_ex\": 10, \"binary_cache_size\": 10000, \"cache_margin\": 1000, \"verbose\": false, \"verbose_every\": 1, \"kwargs\": {}}, \"version\": \"0.7.0\"}, \"data\": {\"anchor\": [\"Marital Status = Never-Married\", \"Relationship = Own-child\"], \"precision\": 1.0, \"coverage\": 0.07165109034267912, \"raw\": {\"feature\": [3, 5], \"mean\": [0.8044052863436123, 1.0], \"precision\": [0.8044052863436123, 1.0], \"coverage\": [0.3037383177570093, 0.07165109034267912], \"examples\": [{\"covered_true\": [[24, 4, 1, 1, 6, 3, 4, 1, 0, 0, 40, 9], [31, 4, 1, 1, 8, 1, 4, 1, 0, 0, 40, 9], [28, 4, 1, 1, 8, 1, 4, 0, 0, 0, 50, 9], [49, 4, 5, 1, 5, 1, 4, 1, 0, 0, 60, 9], [24, 0, 1, 1, 0, 1, 1, 1, 0, 0, 25, 2], [41, 4, 5, 1, 1, 1, 4, 0, 0, 0, 40, 9], [34, 1, 1, 1, 8, 4, 1, 1, 1471, 0, 40, 7], [61, 4, 1, 1, 1, 1, 4, 1, 0, 0, 40, 9], [55, 5, 1, 1, 6, 0, 4, 1, 0, 0, 60, 9], [26, 4, 5, 1, 5, 0, 4, 1, 0, 0, 20, 9]], \"covered_false\": [[47, 2, 5, 1, 5, 1, 4, 1, 0, 0, 35, 9], [30, 4, 1, 1, 8, 4, 4, 0, 0, 0, 45, 9], [49, 7, 2, 1, 8, 1, 4, 0, 0, 2258, 50, 9], [59, 1, 5, 1, 5, 1, 4, 0, 0, 0, 40, 0], [42, 4, 1, 1, 8, 0, 4, 1, 5178, 0, 40, 9], [36, 4, 5, 1, 6, 0, 4, 1, 15024, 0, 45, 9], [33, 4, 1, 1, 5, 0, 4, 1, 15024, 0, 75, 9], [40, 4, 1, 1, 6, 1, 3, 0, 0, 0, 55, 9], [32, 4, 1, 1, 6, 0, 4, 1, 99999, 0, 50, 9], [30, 4, 1, 1, 4, 1, 4, 0, 0, 0, 40, 9]], \"uncovered_true\": [], \"uncovered_false\": []}, {\"covered_true\": [[37, 4, 5, 1, 5, 3, 4, 1, 0, 0, 48, 9], [28, 4, 1, 1, 4, 3, 4, 0, 0, 0, 40, 9], [64, 0, 1, 1, 0, 3, 2, 0, 0, 0, 8, 9], [69, 4, 2, 1, 5, 3, 4, 1, 0, 0, 40, 2], [48, 7, 5, 1, 5, 3, 4, 1, 0, 0, 40, 9], [45, 4, 1, 1, 5, 3, 4, 0, 0, 0, 50, 9], [59, 0, 1, 1, 0, 3, 4, 1, 0, 0, 40, 9], [55, 5, 5, 1, 8, 3, 4, 1, 0, 0, 60, 9], [43, 4, 1, 1, 6, 3, 4, 1, 0, 0, 44, 9], [36, 4, 1, 1, 8, 3, 4, 1, 0, 0, 55, 9]], \"covered_false\": [[26, 4, 1, 1, 5, 3, 4, 1, 10520, 0, 64, 9], [49, 7, 5, 1, 5, 3, 2, 0, 7430, 0, 40, 9], [62, 4, 2, 1, 5, 3, 4, 1, 15024, 0, 50, 9], [63, 6, 1, 1, 6, 3, 4, 1, 10605, 0, 40, 9], [41, 4, 1, 1, 6, 3, 4, 1, 15024, 0, 45, 9], [39, 4, 1, 1, 8, 3, 4, 1, 15024, 0, 60, 9], [44, 4, 5, 1, 5, 3, 4, 1, 7688, 0, 55, 9], [46, 4, 5, 1, 5, 3, 4, 0, 7688, 0, 35, 9], [32, 4, 1, 1, 8, 3, 4, 1, 7298, 0, 45, 9], [51, 5, 5, 1, 8, 3, 4, 1, 15024, 0, 50, 9]], \"uncovered_true\": [], \"uncovered_false\": []}], \"all_precision\": 0, \"num_preds\": 1000000, \"success\": true, \"names\": [\"Marital Status = Never-Married\", \"Relationship = Own-child\"], \"prediction\": [0], \"instance\": [47.0, 4.0, 1.0, 1.0, 1.0, 3.0, 4.0, 1.0, 0.0, 0.0, 40.0, 9.0], \"instances\": [[47.0, 4.0, 1.0, 1.0, 1.0, 3.0, 4.0, 1.0, 0.0, 0.0, 40.0, 9.0]]}}}']}]}\n"
"{'model_name': 'income-explainer_1', 'model_version': '1', 'id': 'a1e804a6-8716-4aa6-bd36-51917b259a60', 'parameters': {'content_type': None, 'headers': None}, 'outputs': [{'name': 'explanation', 'shape': [1], 'datatype': 'BYTES', 'parameters': {'content_type': 'str', 'headers': None}, 'data': ['{\"meta\": {\"name\": \"AnchorTabular\", \"type\": [\"blackbox\"], \"explanations\": [\"local\"], \"params\": {\"seed\": 1, \"disc_perc\": [25, 50, 75], \"threshold\": 0.95, \"delta\": 0.1, \"tau\": 0.15, \"batch_size\": 100, \"coverage_samples\": 10000, \"beam_size\": 1, \"stop_on_first\": false, \"max_anchor_size\": null, \"min_samples_start\": 100, \"n_covered_ex\": 10, \"binary_cache_size\": 10000, \"cache_margin\": 1000, \"verbose\": false, \"verbose_every\": 1, \"kwargs\": {}}, \"version\": \"0.8.0\"}, \"data\": {\"anchor\": [\"Marital Status = Never-Married\", \"Relationship = Own-child\"], \"precision\": 1.0, \"coverage\": 0.07165109034267912, \"raw\": {\"feature\": [3, 5], \"mean\": [0.8040345821325648, 1.0], \"precision\": [0.8040345821325648, 1.0], \"coverage\": [0.3037383177570093, 0.07165109034267912], \"examples\": [{\"covered_true\": [[42, 0, 5, 1, 0, 0, 4, 1, 0, 0, 50, 9], [35, 4, 1, 1, 7, 1, 4, 1, 0, 0, 37, 9], [46, 7, 5, 1, 4, 4, 4, 1, 0, 0, 40, 9], [27, 4, 1, 1, 2, 1, 2, 1, 0, 0, 40, 9], [45, 2, 5, 1, 5, 1, 4, 0, 0, 0, 30, 9], [67, 4, 1, 1, 4, 0, 4, 1, 6514, 0, 7, 9], [43, 4, 1, 1, 2, 0, 4, 1, 0, 0, 48, 9], [35, 4, 1, 1, 6, 5, 4, 0, 0, 0, 30, 9], [46, 4, 1, 1, 5, 0, 4, 1, 0, 1848, 45, 9], [27, 0, 1, 1, 0, 4, 1, 1, 0, 0, 25, 7]], \"covered_false\": [[39, 5, 1, 1, 8, 0, 4, 1, 0, 0, 60, 9], [47, 4, 1, 1, 6, 1, 4, 1, 0, 0, 45, 9], [46, 2, 1, 1, 1, 1, 4, 0, 99999, 0, 40, 9], [36, 5, 1, 1, 6, 0, 4, 1, 15024, 0, 45, 9], [39, 4, 5, 1, 8, 0, 4, 1, 0, 0, 50, 9], [49, 4, 1, 1, 8, 0, 4, 1, 0, 0, 45, 9], [49, 4, 1, 1, 8, 1, 4, 1, 0, 0, 40, 9], [58, 4, 1, 1, 8, 0, 4, 1, 7688, 0, 50, 9], [52, 5, 2, 1, 5, 0, 4, 1, 99999, 0, 65, 9], [62, 4, 1, 1, 8, 1, 4, 1, 10520, 0, 50, 9]], \"uncovered_true\": [], \"uncovered_false\": []}, {\"covered_true\": [[31, 4, 1, 1, 5, 3, 4, 1, 0, 0, 40, 9], [28, 4, 1, 1, 1, 3, 4, 1, 0, 0, 45, 9], [27, 7, 5, 1, 5, 3, 4, 1, 0, 0, 40, 9], [37, 4, 5, 1, 8, 3, 4, 1, 0, 0, 40, 9], [45, 4, 2, 1, 5, 3, 1, 1, 0, 0, 45, 2], [46, 4, 1, 1, 7, 3, 4, 1, 0, 0, 40, 9], [62, 7, 1, 1, 1, 3, 4, 1, 0, 0, 38, 9], [34, 4, 5, 1, 5, 3, 1, 1, 0, 0, 43, 1], [37, 5, 5, 1, 8, 3, 4, 1, 0, 0, 70, 9], [56, 4, 1, 1, 5, 3, 4, 1, 0, 0, 40, 9]], \"covered_false\": [[33, 4, 5, 1, 5, 3, 4, 1, 15024, 0, 44, 9], [40, 1, 1, 1, 5, 3, 4, 1, 7688, 0, 66, 9], [36, 4, 1, 1, 8, 3, 4, 1, 27828, 0, 40, 9], [55, 5, 1, 1, 8, 3, 4, 1, 0, 2415, 50, 9], [54, 5, 1, 1, 8, 3, 4, 1, 7688, 0, 40, 0], [27, 4, 1, 1, 5, 3, 1, 1, 13550, 0, 40, 9], [48, 4, 1, 1, 4, 3, 4, 0, 99999, 0, 40, 9], [55, 4, 5, 1, 5, 3, 4, 1, 15024, 0, 50, 0], [66, 4, 1, 1, 6, 3, 4, 1, 20051, 0, 40, 9], [35, 4, 1, 1, 2, 3, 4, 1, 7298, 0, 35, 9]], \"uncovered_true\": [], \"uncovered_false\": []}], \"all_precision\": 0, \"num_preds\": 1000000, \"success\": true, \"names\": [\"Marital Status = Never-Married\", \"Relationship = Own-child\"], \"prediction\": [0], \"instance\": [47.0, 4.0, 1.0, 1.0, 1.0, 3.0, 4.0, 1.0, 0.0, 0.0, 40.0, 9.0], \"instances\": [[47.0, 4.0, 1.0, 1.0, 1.0, 3.0, 4.0, 1.0, 0.0, 0.0, 40.0, 9.0]]}}}']}]}\n"
]
}
],
Expand All @@ -549,7 +549,7 @@
},
{
"cell_type": "code",
"execution_count": 53,
"execution_count": 21,
"id": "a2d69d25",
"metadata": {},
"outputs": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
meta.dill
model
OutlierVAE.dill
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "income-drift",
"implementation": "mlserver_alibi_detect.AlibiDetectRuntime",
"parameters": {
"uri": "./",
"version": "v0.1.0"
}
}
1 change: 1 addition & 0 deletions samples/examples/income_classifier/preprocessor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
model.joblib
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "income-preprocess",
"implementation": "mlserver_sklearn.SKLearnModel",
"parameters": {
"version": "v0.1.0",
"extra": {
"predict_fn": "transform"
}
}
}
2 changes: 1 addition & 1 deletion samples/examples/income_classifier/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
alibi==0.7.0
alibi==0.8.0
alibi-detect==0.10.0
scikit-learn==1.1.2
Loading

0 comments on commit feaf14d

Please sign in to comment.