Skip to content

Commit f43e99f

Browse files
authored
update kserve to version 0.15.0 (#1180)
Signed-off-by: grudloffev <[email protected]>
1 parent a93b143 commit f43e99f

File tree

1 file changed

+36
-12
lines changed

1 file changed

+36
-12
lines changed

kserve/sdk/first_isvc_kserve.ipynb

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"metadata": {},
2828
"outputs": [],
2929
"source": [
30-
"!pip install kserve==0.7.0"
30+
"!pip install kserve==0.15.0"
3131
]
3232
},
3333
{
@@ -40,7 +40,7 @@
4040
},
4141
{
4242
"cell_type": "code",
43-
"execution_count": 2,
43+
"execution_count": null,
4444
"id": "a38cbeda-eb60-4469-b861-559950886453",
4545
"metadata": {},
4646
"outputs": [],
@@ -67,7 +67,7 @@
6767
},
6868
{
6969
"cell_type": "code",
70-
"execution_count": 3,
70+
"execution_count": null,
7171
"id": "6a621ac9-1847-4249-b12a-76cf23620534",
7272
"metadata": {},
7373
"outputs": [],
@@ -94,7 +94,7 @@
9494
},
9595
{
9696
"cell_type": "code",
97-
"execution_count": 4,
97+
"execution_count": null,
9898
"id": "9a7f9b69-a305-482b-a9e1-0b706ba11341",
9999
"metadata": {},
100100
"outputs": [],
@@ -104,13 +104,13 @@
104104
"api_version = constants.KSERVE_GROUP + '/' + kserve_version\n",
105105
"\n",
106106
"isvc = V1beta1InferenceService(api_version=api_version,\n",
107-
" kind=constants.KSERVE_KIND,\n",
107+
" kind=constants.KSERVE_KIND_INFERENCESERVICE,\n",
108108
" metadata=client.V1ObjectMeta(\n",
109109
" name=name, namespace=namespace, annotations={'sidecar.istio.io/inject':'false'}),\n",
110110
" spec=V1beta1InferenceServiceSpec(\n",
111111
" predictor=V1beta1PredictorSpec(\n",
112112
" sklearn=(V1beta1SKLearnSpec(\n",
113-
" storage_uri=\"gs://kfserving-samples/models/sklearn/iris\"))))\n",
113+
" storage_uri=\"gs://kfserving-examples/models/sklearn/1.0/model\"))))\n",
114114
")"
115115
]
116116
},
@@ -189,7 +189,7 @@
189189
" ]\n",
190190
"}\n",
191191
"\n",
192-
"response = requests.post(isvc_url, json=inference_input)\n",
192+
"response = requests.post(f\"{isvc_url}/v1/models/{name}:predict\", json=inference_input)\n",
193193
"print(response.text)"
194194
]
195195
},
@@ -221,7 +221,19 @@
221221
"metadata": {},
222222
"outputs": [],
223223
"source": [
224-
"!kubectl create -f https://raw.githubusercontent.com/kserve/kserve/release-0.7/docs/samples/v1beta1/sklearn/v1/perf.yaml -n kubeflow-user-example-com"
224+
"creation_output=!kubectl create -f https://raw.githubusercontent.com/kserve/kserve/release-0.15/docs/samples/v1beta1/sklearn/v1/perf.yaml -n {namespace}\n",
225+
"creation_output"
226+
]
227+
},
228+
{
229+
"cell_type": "code",
230+
"execution_count": null,
231+
"id": "a17377b8-30b8-43c2-a39c-da6aded3ff40",
232+
"metadata": {},
233+
"outputs": [],
234+
"source": [
235+
"job_name = creation_output[0].split(\"/\")[-1].split(\" \")[0]\n",
236+
"job_name"
225237
]
226238
},
227239
{
@@ -239,7 +251,19 @@
239251
"metadata": {},
240252
"outputs": [],
241253
"source": [
242-
"!kubectl get pods --namespace=kubeflow-user-example-com | grep load"
254+
"get_pod_output=!kubectl get pods -n {namespace} | grep {job_name}\n",
255+
"get_pod_output"
256+
]
257+
},
258+
{
259+
"cell_type": "code",
260+
"execution_count": null,
261+
"id": "2d6318ef-0360-4eae-8775-f1a1ac6e5fac",
262+
"metadata": {},
263+
"outputs": [],
264+
"source": [
265+
"pod_name=get_pod_output[0].split(\" \")[0]\n",
266+
"pod_name"
243267
]
244268
},
245269
{
@@ -257,7 +281,7 @@
257281
"metadata": {},
258282
"outputs": [],
259283
"source": [
260-
"!kubectl logs <job-name> -n kubeflow-user-example-com"
284+
"!kubectl logs {pod_name} -n {namespace}"
261285
]
262286
},
263287
{
@@ -302,7 +326,7 @@
302326
],
303327
"metadata": {
304328
"kernelspec": {
305-
"display_name": "Python 3",
329+
"display_name": "Python 3 (ipykernel)",
306330
"language": "python",
307331
"name": "python3"
308332
},
@@ -316,7 +340,7 @@
316340
"name": "python",
317341
"nbconvert_exporter": "python",
318342
"pygments_lexer": "ipython3",
319-
"version": "3.8.10"
343+
"version": "3.11.10"
320344
}
321345
},
322346
"nbformat": 4,

0 commit comments

Comments
 (0)