Skip to content

Commit 6681d4f

Browse files
woopfeast-ci-bot
authored andcommitted
Update basic Feast example to Feast 0.4 (#424)
1 parent 9912d45 commit 6681d4f

File tree

1 file changed

+31
-30
lines changed

1 file changed

+31
-30
lines changed

examples/basic/basic.ipynb

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5+
"metadata": {},
56
"source": [
67
"# Feast Basic Customer Transactions Example"
7-
],
8-
"metadata": {
9-
"collapsed": false
10-
}
8+
]
119
},
1210
{
1311
"cell_type": "markdown",
@@ -48,7 +46,7 @@
4846
},
4947
{
5048
"cell_type": "code",
51-
"execution_count": 8,
49+
"execution_count": null,
5250
"metadata": {},
5351
"outputs": [],
5452
"source": [
@@ -73,7 +71,7 @@
7371
},
7472
{
7573
"cell_type": "code",
76-
"execution_count": 9,
74+
"execution_count": null,
7775
"metadata": {},
7876
"outputs": [],
7977
"source": [
@@ -84,11 +82,13 @@
8482
},
8583
{
8684
"cell_type": "code",
87-
"execution_count": 10,
85+
"execution_count": null,
8886
"metadata": {},
8987
"outputs": [],
9088
"source": [
91-
"client = Client(core_url=CORE_URL, serving_url=BATCH_SERVING_URL) # Connect to Feast Core"
89+
"client = Client(core_url=CORE_URL, serving_url=BATCH_SERVING_URL) # Connect to Feast Core\n",
90+
"client.create_project('customer_project')\n",
91+
"client.set_project('customer_project')"
9292
]
9393
},
9494
{
@@ -107,7 +107,7 @@
107107
},
108108
{
109109
"cell_type": "code",
110-
"execution_count": 24,
110+
"execution_count": null,
111111
"metadata": {},
112112
"outputs": [],
113113
"source": [
@@ -119,7 +119,7 @@
119119
},
120120
{
121121
"cell_type": "code",
122-
"execution_count": 25,
122+
"execution_count": null,
123123
"metadata": {},
124124
"outputs": [],
125125
"source": [
@@ -154,7 +154,7 @@
154154
},
155155
{
156156
"cell_type": "code",
157-
"execution_count": 13,
157+
"execution_count": null,
158158
"metadata": {},
159159
"outputs": [],
160160
"source": [
@@ -174,7 +174,7 @@
174174
},
175175
{
176176
"cell_type": "code",
177-
"execution_count": 26,
177+
"execution_count": null,
178178
"metadata": {},
179179
"outputs": [],
180180
"source": [
@@ -197,7 +197,7 @@
197197
},
198198
{
199199
"cell_type": "code",
200-
"execution_count": 16,
200+
"execution_count": null,
201201
"metadata": {},
202202
"outputs": [],
203203
"source": [
@@ -213,7 +213,7 @@
213213
},
214214
{
215215
"cell_type": "code",
216-
"execution_count": 17,
216+
"execution_count": null,
217217
"metadata": {},
218218
"outputs": [],
219219
"source": [
@@ -230,7 +230,7 @@
230230
},
231231
{
232232
"cell_type": "code",
233-
"execution_count": 27,
233+
"execution_count": null,
234234
"metadata": {},
235235
"outputs": [],
236236
"source": [
@@ -255,7 +255,7 @@
255255
},
256256
{
257257
"cell_type": "code",
258-
"execution_count": 30,
258+
"execution_count": null,
259259
"metadata": {},
260260
"outputs": [],
261261
"source": [
@@ -280,14 +280,14 @@
280280
},
281281
{
282282
"cell_type": "code",
283-
"execution_count": 32,
283+
"execution_count": null,
284284
"metadata": {},
285285
"outputs": [],
286286
"source": [
287287
"job = client.get_batch_features(\n",
288-
" feature_ids=[\n",
289-
" f\"customer_transactions:{customer_fs.version}:daily_transactions\", \n",
290-
" f\"customer_transactions:{customer_fs.version}:total_transactions\", \n",
288+
" feature_refs=[\n",
289+
" f\"daily_transactions\", \n",
290+
" f\"total_transactions\", \n",
291291
" ],\n",
292292
" entity_rows=entity_rows\n",
293293
" )\n",
@@ -311,11 +311,12 @@
311311
},
312312
{
313313
"cell_type": "code",
314-
"execution_count": 36,
314+
"execution_count": null,
315315
"metadata": {},
316316
"outputs": [],
317317
"source": [
318-
"online_client = Client(core_url=CORE_URL, serving_url=ONLINE_SERVING_URL)"
318+
"online_client = Client(core_url=CORE_URL, serving_url=ONLINE_SERVING_URL)\n",
319+
"online_client.set_project(\"customer_project\")"
319320
]
320321
},
321322
{
@@ -327,14 +328,14 @@
327328
},
328329
{
329330
"cell_type": "code",
330-
"execution_count": 37,
331+
"execution_count": null,
331332
"metadata": {},
332333
"outputs": [],
333334
"source": [
334335
"online_features = online_client.get_online_features(\n",
335-
" feature_ids=[\n",
336-
" f\"customer_transactions:{customer_fs.version}:daily_transactions\",\n",
337-
" f\"customer_transactions:{customer_fs.version}:total_transactions\",\n",
336+
" feature_refs=[\n",
337+
" f\"daily_transactions\",\n",
338+
" f\"total_transactions\",\n",
338339
" ],\n",
339340
" entity_rows=[\n",
340341
" GetOnlineFeaturesRequest.EntityRow(\n",
@@ -373,18 +374,18 @@
373374
"name": "python",
374375
"nbconvert_exporter": "python",
375376
"pygments_lexer": "ipython3",
376-
"version": "3.7.4"
377+
"version": "3.7.3"
377378
},
378379
"pycharm": {
379380
"stem_cell": {
380381
"cell_type": "raw",
381-
"source": [],
382382
"metadata": {
383383
"collapsed": false
384-
}
384+
},
385+
"source": []
385386
}
386387
}
387388
},
388389
"nbformat": 4,
389390
"nbformat_minor": 2
390-
}
391+
}

0 commit comments

Comments
 (0)