Skip to content

Commit

Permalink
Fix: update k8s CRDs after experiment change (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
ukclivecox authored Jul 31, 2022
1 parent b7925a0 commit e11f7a9
Show file tree
Hide file tree
Showing 10 changed files with 605 additions and 346 deletions.
249 changes: 167 additions & 82 deletions k8s/helm-charts/seldon-core-v2-crds/templates/seldon-v2-crds.yaml

Large diffs are not rendered by default.

249 changes: 167 additions & 82 deletions k8s/yaml/seldon-v2-crds.yaml

Large diffs are not rendered by default.

13 changes: 4 additions & 9 deletions operator/config/crd/bases/mlops.seldon.io_experiments.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: experiments.mlops.seldon.io
spec:
Expand Down Expand Up @@ -51,7 +50,7 @@ spec:
- weight
type: object
type: array
defaultModel:
default:
type: string
mirror:
properties:
Expand All @@ -64,6 +63,8 @@ spec:
- model_name
- percent
type: object
resourceType:
type: string
required:
- candidates
type: object
Expand Down Expand Up @@ -124,9 +125,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
9 changes: 1 addition & 8 deletions operator/config/crd/bases/mlops.seldon.io_models.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: models.mlops.seldon.io
spec:
Expand Down Expand Up @@ -178,9 +177,3 @@ spec:
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
9 changes: 1 addition & 8 deletions operator/config/crd/bases/mlops.seldon.io_pipelines.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: pipelines.mlops.seldon.io
spec:
Expand Down Expand Up @@ -177,9 +176,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
113 changes: 79 additions & 34 deletions operator/config/crd/bases/mlops.seldon.io_serverconfigs.yaml

Large diffs are not rendered by default.

110 changes: 82 additions & 28 deletions operator/config/crd/bases/mlops.seldon.io_servers.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion operator/config/rbac/role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
24 changes: 12 additions & 12 deletions samples/explainer-examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
" name: income\r\n",
" namespace: seldon-mesh\r\n",
"spec:\r\n",
" storageUri: \"gs://seldon-models/mlserver/income\"\r\n",
" storageUri: \"gs://seldon-models/scv2/examples/income/classifier\"\r\n",
" requirements:\r\n",
" - sklearn\r\n"
]
Expand Down Expand Up @@ -54,7 +54,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 3,
"id": "b1a65e4f",
"metadata": {},
"outputs": [
Expand All @@ -72,7 +72,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 10,
"id": "1729d991",
"metadata": {},
"outputs": [
Expand All @@ -83,7 +83,7 @@
"{\r\n",
"\t\"model_name\": \"income_1\",\r\n",
"\t\"model_version\": \"1\",\r\n",
"\t\"id\": \"07975062-e883-43b5-882f-524bfd380806\",\r\n",
"\t\"id\": \"3d2a697d-9c8d-40bb-b2bf-16f1a5a64402\",\r\n",
"\t\"parameters\": {\r\n",
"\t\t\"content_type\": null,\r\n",
"\t\t\"headers\": null\r\n",
Expand All @@ -107,7 +107,7 @@
],
"source": [
"!seldon model infer income \\\n",
" '{\"inputs\": [{\"name\": \"predict\", \"shape\": [1, 12], \"datatype\": \"FP32\", \"data\": [[53,4,0,2,8,4,2,0,0,0,60,9]]}]}' "
" '{\"inputs\": [{\"name\": \"predict\", \"shape\": [1, 12], \"datatype\": \"FP32\", \"data\": [[47,4,1,1,1,3,4,1,0,0,40,9]]}]}' "
]
},
{
Expand All @@ -126,7 +126,7 @@
" name: income-explainer\r\n",
" namespace: seldon-mesh\r\n",
"spec:\r\n",
" storageUri: \"gs://seldon-models/mlserver/alibi-explain/income\"\r\n",
" storageUri: \"gs://seldon-models/scv2/examples/income/explainer\"\r\n",
" explainer:\r\n",
" type: anchor_tabular\r\n",
" modelRef: income\r\n"
Expand Down Expand Up @@ -157,7 +157,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"id": "10e50de8",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -186,7 +186,7 @@
"{\r\n",
"\t\"model_name\": \"income-explainer_1\",\r\n",
"\t\"model_version\": \"1\",\r\n",
"\t\"id\": \"12eef6f5-8d87-420e-8c3f-4091014be7ce\",\r\n",
"\t\"id\": \"aa5888ed-ce2b-40c5-8604-dd7bdb1ef23b\",\r\n",
"\t\"parameters\": {\r\n",
"\t\t\"content_type\": null,\r\n",
"\t\t\"headers\": null\r\n",
Expand All @@ -203,7 +203,7 @@
"\t\t\t\t\"headers\": null\r\n",
"\t\t\t},\r\n",
"\t\t\t\"data\": [\r\n",
"\t\t\t\t\"{\\\"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 = Separated\\\", \\\"Capital Gain <= 0.00\\\"], \\\"precision\\\": 0.9829351535836177, \\\"coverage\\\": 0.16943333333333332, \\\"raw\\\": {\\\"feature\\\": [3, 8], \\\"mean\\\": [0.9465408805031447, 0.9829351535836177], \\\"precision\\\": [0.9465408805031447, 0.9829351535836177], \\\"coverage\\\": [0.18063333333333334, 0.16943333333333332], \\\"examples\\\": [{\\\"covered_true\\\": [[19, 4, 3, 2, 2, 3, 4, 1, 0, 0, 40, 9], [27, 4, 4, 2, 6, 0, 4, 1, 0, 0, 40, 9], [39, 4, 4, 2, 2, 0, 4, 1, 0, 0, 40, 9], [27, 4, 4, 2, 2, 0, 4, 1, 0, 0, 45, 9], [32, 0, 3, 2, 0, 1, 4, 0, 0, 0, 49, 9], [27, 4, 4, 2, 1, 1, 4, 1, 4416, 0, 40, 9], [58, 5, 1, 2, 5, 0, 4, 1, 0, 0, 40, 9], [47, 4, 4, 2, 1, 4, 4, 0, 0, 0, 20, 9], [24, 4, 4, 2, 7, 3, 4, 0, 0, 0, 30, 9], [30, 6, 4, 2, 2, 1, 4, 1, 0, 0, 35, 9]], \\\"covered_false\\\": [[33, 4, 5, 2, 8, 0, 4, 1, 0, 1902, 45, 3], [34, 4, 1, 2, 8, 1, 4, 1, 0, 0, 85, 1], [64, 5, 1, 2, 8, 0, 4, 1, 15024, 0, 55, 9]], \\\"uncovered_true\\\": [], \\\"uncovered_false\\\": []}, {\\\"covered_true\\\": [[31, 4, 4, 2, 7, 1, 4, 0, 0, 0, 40, 9], [55, 4, 3, 2, 6, 3, 4, 0, 0, 0, 20, 9], [39, 4, 0, 2, 2, 3, 4, 1, 0, 0, 40, 9], [36, 4, 0, 2, 5, 5, 4, 0, 0, 0, 40, 9], [49, 6, 4, 2, 2, 1, 4, 1, 0, 0, 55, 9], [25, 4, 4, 2, 7, 3, 4, 0, 0, 0, 8, 9], [39, 4, 4, 2, 7, 5, 4, 0, 0, 0, 40, 9], [65, 4, 4, 2, 6, 4, 4, 0, 0, 0, 25, 0], [54, 6, 5, 2, 5, 1, 4, 1, 0, 0, 50, 9], [36, 4, 0, 2, 1, 4, 4, 0, 0, 0, 40, 9]], \\\"covered_false\\\": [[48, 4, 5, 2, 5, 0, 4, 1, 0, 1902, 40, 9], [43, 4, 5, 2, 8, 4, 4, 0, 0, 2547, 40, 9], [43, 6, 1, 2, 5, 5, 4, 0, 0, 1887, 70, 9], [41, 4, 6, 2, 5, 0, 4, 1, 0, 2415, 40, 9], [44, 4, 1, 2, 8, 0, 4, 1, 0, 1902, 56, 9]], \\\"uncovered_true\\\": [], \\\"uncovered_false\\\": []}], \\\"all_precision\\\": 0, \\\"num_preds\\\": 1000000, \\\"success\\\": true, \\\"names\\\": [\\\"Marital Status = Separated\\\", \\\"Capital Gain <= 0.00\\\"], \\\"prediction\\\": [0], \\\"instance\\\": [53.0, 4.0, 0.0, 2.0, 8.0, 4.0, 2.0, 0.0, 0.0, 0.0, 60.0, 9.0], \\\"instances\\\": [[53.0, 4.0, 0.0, 2.0, 8.0, 4.0, 2.0, 0.0, 0.0, 0.0, 60.0, 9.0]]}}}\"\r\n",
"\t\t\t\t\"{\\\"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\\\", \\\"Capital Gain <= 0.00\\\"], \\\"precision\\\": 0.9949109414758269, \\\"coverage\\\": 0.06853582554517133, \\\"raw\\\": {\\\"feature\\\": [3, 5, 8], \\\"mean\\\": [0.8285714285714286, 0.9194630872483222, 0.9949109414758269], \\\"precision\\\": [0.8285714285714286, 0.9194630872483222, 0.9949109414758269], \\\"coverage\\\": [0.3037383177570093, 0.07165109034267912, 0.06853582554517133], \\\"examples\\\": [{\\\"covered_true\\\": [[34, 5, 1, 1, 5, 0, 4, 1, 0, 0, 60, 9], [34, 4, 5, 1, 2, 0, 4, 1, 0, 0, 40, 5], [45, 2, 5, 1, 5, 1, 4, 0, 0, 0, 35, 9], [34, 4, 1, 1, 5, 0, 4, 1, 0, 1848, 40, 8], [25, 2, 1, 1, 4, 4, 1, 0, 0, 0, 40, 7], [35, 4, 1, 1, 5, 1, 4, 0, 0, 0, 40, 9], [39, 4, 1, 1, 5, 0, 4, 1, 0, 0, 50, 9], [31, 4, 1, 1, 5, 1, 4, 1, 0, 0, 40, 9], [40, 4, 1, 1, 1, 0, 4, 1, 0, 0, 40, 9], [34, 1, 2, 1, 5, 1, 4, 0, 0, 0, 99, 9]], \\\"covered_false\\\": [[38, 4, 2, 1, 8, 5, 4, 0, 99999, 0, 36, 9], [42, 2, 5, 1, 8, 0, 4, 1, 0, 1902, 60, 9], [29, 4, 1, 1, 5, 1, 4, 1, 0, 0, 50, 9], [35, 4, 2, 1, 5, 0, 1, 1, 0, 1902, 40, 2], [36, 6, 2, 1, 5, 1, 4, 1, 0, 0, 40, 9], [47, 2, 5, 1, 4, 1, 2, 1, 0, 0, 50, 9], [52, 2, 2, 1, 8, 0, 4, 1, 0, 0, 40, 9], [41, 4, 1, 1, 5, 0, 4, 1, 0, 0, 45, 9], [45, 6, 1, 1, 6, 1, 4, 1, 14084, 0, 45, 9], [44, 4, 1, 1, 7, 1, 4, 1, 0, 0, 40, 9]], \\\"uncovered_true\\\": [], \\\"uncovered_false\\\": []}, {\\\"covered_true\\\": [[38, 7, 1, 1, 8, 3, 4, 1, 0, 0, 37, 9], [46, 6, 5, 1, 8, 3, 4, 1, 0, 0, 30, 9], [49, 6, 1, 1, 5, 3, 4, 1, 0, 0, 40, 9], [32, 2, 5, 1, 5, 3, 4, 1, 0, 0, 50, 9], [85, 4, 1, 1, 8, 3, 4, 1, 0, 0, 3, 4], [22, 4, 1, 1, 8, 3, 4, 0, 0, 0, 50, 9], [29, 2, 1, 1, 5, 3, 4, 1, 0, 0, 40, 9], [35, 4, 1, 1, 6, 3, 4, 1, 0, 0, 40, 9], [45, 2, 1, 1, 5, 3, 4, 0, 0, 0, 40, 9], [65, 7, 5, 1, 5, 3, 4, 1, 6514, 0, 35, 9]], \\\"covered_false\\\": [[61, 4, 1, 1, 5, 3, 4, 1, 15024, 0, 50, 9], [45, 2, 5, 1, 8, 3, 4, 1, 7688, 0, 50, 9], [39, 4, 1, 1, 8, 3, 4, 1, 15024, 0, 45, 9], [47, 4, 1, 1, 4, 3, 4, 1, 15024, 0, 40, 9], [42, 6, 1, 1, 2, 3, 4, 1, 15024, 0, 60, 9], [48, 4, 1, 1, 4, 3, 4, 0, 99999, 0, 40, 9], [57, 4, 5, 1, 5, 3, 4, 1, 10520, 0, 32, 9]], \\\"uncovered_true\\\": [], \\\"uncovered_false\\\": []}, {\\\"covered_true\\\": [[48, 6, 1, 1, 5, 3, 4, 0, 0, 0, 20, 9], [55, 4, 1, 1, 8, 3, 4, 1, 0, 0, 48, 9], [43, 7, 1, 1, 5, 3, 4, 0, 0, 0, 36, 9], [40, 7, 2, 1, 5, 3, 2, 0, 0, 0, 40, 9], [38, 1, 5, 1, 8, 3, 4, 1, 0, 0, 40, 9], [57, 4, 5, 1, 8, 3, 4, 1, 0, 2824, 50, 9], [59, 7, 5, 1, 5, 3, 4, 1, 0, 0, 50, 9], [23, 4, 1, 1, 6, 3, 4, 1, 0, 0, 55, 9], [26, 4, 5, 1, 5, 3, 4, 0, 0, 1876, 40, 9], [60, 4, 5, 1, 5, 3, 2, 1, 0, 0, 40, 9]], \\\"covered_false\\\": [], \\\"uncovered_true\\\": [], \\\"uncovered_false\\\": []}], \\\"all_precision\\\": 0, \\\"num_preds\\\": 1000000, \\\"success\\\": true, \\\"names\\\": [\\\"Marital Status = Never-Married\\\", \\\"Relationship = Own-child\\\", \\\"Capital Gain <= 0.00\\\"], \\\"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]]}}}\"\r\n",
"\t\t\t]\r\n",
"\t\t}\r\n",
"\t]\r\n",
Expand All @@ -213,12 +213,12 @@
],
"source": [
"!seldon model infer income-explainer \\\n",
" '{\"inputs\": [{\"name\": \"predict\", \"shape\": [1, 12], \"datatype\": \"FP32\", \"data\": [[53,4,0,2,8,4,2,0,0,0,60,9]]}]}'"
" '{\"inputs\": [{\"name\": \"predict\", \"shape\": [1, 12], \"datatype\": \"FP32\", \"data\": [[47,4,1,1,1,3,4,1,0,0,40,9]]}]}'"
]
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"id": "a8d8b077",
"metadata": {},
"outputs": [
Expand All @@ -236,7 +236,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"id": "bce80764",
"metadata": {},
"outputs": [
Expand Down
Loading

0 comments on commit e11f7a9

Please sign in to comment.