Skip to content

Commit d67d459

Browse files
authored
[FSTORE-1396] Tutorials Update: Save/load XGBoost model as json file (#265)
* Replace pickling xgboost models with saving them as json objects for the model registry
1 parent 0a247dc commit d67d459

30 files changed

+957
-990
lines changed

advanced_tutorials/citibike/1_citibike_feature_backfill.ipynb

+49-46
Large diffs are not rendered by default.

advanced_tutorials/citibike/2_citibike_feature_pipeline.ipynb

+35-32
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "74b6c01c",
5+
"id": "d179fa38",
66
"metadata": {},
77
"source": [
88
"# <span style=\"font-width:bold; font-size: 3rem; color:#1EB182;\">**Hopsworks Feature Store** </span><span style=\"font-width:bold; font-size: 3rem; color:#333;\">- Part 02: Feature Pipeline</span>\n",
@@ -15,7 +15,7 @@
1515
},
1616
{
1717
"cell_type": "markdown",
18-
"id": "8d022a10",
18+
"id": "66df50de",
1919
"metadata": {},
2020
"source": [
2121
"### <span style='color:#ff5f27'> 📝 Imports"
@@ -24,15 +24,18 @@
2424
{
2525
"cell_type": "code",
2626
"execution_count": null,
27-
"id": "7faa949f",
27+
"id": "5b87f18e",
2828
"metadata": {},
2929
"outputs": [],
3030
"source": [
3131
"from datetime import timedelta, datetime\n",
3232
"import pandas as pd\n",
3333
"import os\n",
3434
"\n",
35-
"from features import citibike, meteorological_measurements\n",
35+
"from features import (\n",
36+
" citibike, \n",
37+
" meteorological_measurements,\n",
38+
")\n",
3639
"\n",
3740
"# Mute warnings\n",
3841
"import warnings\n",
@@ -41,15 +44,15 @@
4144
},
4245
{
4346
"cell_type": "markdown",
44-
"id": "d3dc1ac1",
47+
"id": "b33339b0",
4548
"metadata": {},
4649
"source": [
4750
"---"
4851
]
4952
},
5053
{
5154
"cell_type": "markdown",
52-
"id": "77939976",
55+
"id": "1dfacd9f",
5356
"metadata": {},
5457
"source": [
5558
"## <span style=\"color:#ff5f27;\"> 📡 Connecting to Hopsworks Feature Store </span>"
@@ -58,7 +61,7 @@
5861
{
5962
"cell_type": "code",
6063
"execution_count": null,
61-
"id": "608986f1",
64+
"id": "3046b3e4",
6265
"metadata": {},
6366
"outputs": [],
6467
"source": [
@@ -72,7 +75,7 @@
7275
{
7376
"cell_type": "code",
7477
"execution_count": null,
75-
"id": "2cc9d553",
78+
"id": "bd7ce002",
7679
"metadata": {},
7780
"outputs": [],
7881
"source": [
@@ -90,7 +93,7 @@
9093
},
9194
{
9295
"cell_type": "markdown",
93-
"id": "bf4c2d52",
96+
"id": "6c7b15a8",
9497
"metadata": {},
9598
"source": [
9699
"### <span style=\"color:#ff5f27;\">📅 Getting tha last date</span>\n"
@@ -99,7 +102,7 @@
99102
{
100103
"cell_type": "code",
101104
"execution_count": null,
102-
"id": "6f339455",
105+
"id": "ffeaec13",
103106
"metadata": {
104107
"scrolled": true
105108
},
@@ -113,7 +116,7 @@
113116
{
114117
"cell_type": "code",
115118
"execution_count": null,
116-
"id": "41c8bce4",
119+
"id": "e800d919",
117120
"metadata": {},
118121
"outputs": [],
119122
"source": [
@@ -125,7 +128,7 @@
125128
{
126129
"cell_type": "code",
127130
"execution_count": null,
128-
"id": "93633194",
131+
"id": "a97c80e1",
129132
"metadata": {},
130133
"outputs": [],
131134
"source": [
@@ -137,23 +140,23 @@
137140
},
138141
{
139142
"cell_type": "markdown",
140-
"id": "dce30ea9",
143+
"id": "05fabd24",
141144
"metadata": {},
142145
"source": [
143146
"---"
144147
]
145148
},
146149
{
147150
"cell_type": "markdown",
148-
"id": "2bfde864",
151+
"id": "fd72808f",
149152
"metadata": {},
150153
"source": [
151154
"## <span style=\"color:#ff5f27;\"> 🪄 Parsing new data</span>"
152155
]
153156
},
154157
{
155158
"cell_type": "markdown",
156-
"id": "d41cb2c5",
159+
"id": "32c5efb2",
157160
"metadata": {},
158161
"source": [
159162
"### <span style=\"color:#ff5f27;\"> 🚲 Citibike usage info</span>"
@@ -162,7 +165,7 @@
162165
{
163166
"cell_type": "code",
164167
"execution_count": null,
165-
"id": "2ca902e0",
168+
"id": "63aa1c27",
166169
"metadata": {},
167170
"outputs": [],
168171
"source": [
@@ -177,7 +180,7 @@
177180
{
178181
"cell_type": "code",
179182
"execution_count": null,
180-
"id": "6efc7e2f",
183+
"id": "19a46498",
181184
"metadata": {},
182185
"outputs": [],
183186
"source": [
@@ -190,7 +193,7 @@
190193
{
191194
"cell_type": "code",
192195
"execution_count": null,
193-
"id": "62cb7d60",
196+
"id": "198d0ba4",
194197
"metadata": {},
195198
"outputs": [],
196199
"source": [
@@ -206,15 +209,15 @@
206209
},
207210
{
208211
"cell_type": "markdown",
209-
"id": "aa39e68f",
212+
"id": "8bf55a65",
210213
"metadata": {},
211214
"source": [
212215
"### <span style=\"color:#ff5f27;\"> 🌤 Meteorological measurements from VisualCrossing</span>"
213216
]
214217
},
215218
{
216219
"cell_type": "markdown",
217-
"id": "623ed453",
220+
"id": "cf040fe7",
218221
"metadata": {},
219222
"source": [
220223
"You will parse weather data so you should get an API key from [VisualCrossing](https://www.visualcrossing.com/). You can use [this link](https://www.visualcrossing.com/weather-api).\n",
@@ -231,7 +234,7 @@
231234
{
232235
"cell_type": "code",
233236
"execution_count": null,
234-
"id": "525d223f",
237+
"id": "af212086",
235238
"metadata": {},
236239
"outputs": [],
237240
"source": [
@@ -245,7 +248,7 @@
245248
{
246249
"cell_type": "code",
247250
"execution_count": null,
248-
"id": "183769e6",
251+
"id": "3773aa84",
249252
"metadata": {},
250253
"outputs": [],
251254
"source": [
@@ -261,7 +264,7 @@
261264
{
262265
"cell_type": "code",
263266
"execution_count": null,
264-
"id": "74198dc8",
267+
"id": "ce61c382",
265268
"metadata": {},
266269
"outputs": [],
267270
"source": [
@@ -273,7 +276,7 @@
273276
{
274277
"cell_type": "code",
275278
"execution_count": null,
276-
"id": "3b343078",
279+
"id": "28655bc8",
277280
"metadata": {},
278281
"outputs": [],
279282
"source": [
@@ -288,15 +291,15 @@
288291
},
289292
{
290293
"cell_type": "markdown",
291-
"id": "ebdb3fa7",
294+
"id": "f3426f85",
292295
"metadata": {},
293296
"source": [
294297
"---"
295298
]
296299
},
297300
{
298301
"cell_type": "markdown",
299-
"id": "d95d789c",
302+
"id": "f5dad7d4",
300303
"metadata": {},
301304
"source": [
302305
"## <span style=\"color:#ff5f27;\">⬆️ Uploading new data to the Feature Store</span>"
@@ -305,7 +308,7 @@
305308
{
306309
"cell_type": "code",
307310
"execution_count": null,
308-
"id": "d207b245",
311+
"id": "9b144f46",
309312
"metadata": {},
310313
"outputs": [],
311314
"source": [
@@ -316,7 +319,7 @@
316319
{
317320
"cell_type": "code",
318321
"execution_count": null,
319-
"id": "dfd8086a",
322+
"id": "0c4a51b2",
320323
"metadata": {},
321324
"outputs": [],
322325
"source": [
@@ -326,15 +329,15 @@
326329
},
327330
{
328331
"cell_type": "markdown",
329-
"id": "4f39826e",
332+
"id": "a4b670d1",
330333
"metadata": {},
331334
"source": [
332335
"---"
333336
]
334337
},
335338
{
336339
"cell_type": "markdown",
337-
"id": "139be1e7",
340+
"id": "84acdbfe",
338341
"metadata": {},
339342
"source": [
340343
"## <span style=\"color:#ff5f27;\">⏭️ **Next:** Part 03: Training Pipeline </span>\n",
@@ -345,7 +348,7 @@
345348
],
346349
"metadata": {
347350
"kernelspec": {
348-
"display_name": "Python 3 (ipykernel)",
351+
"display_name": "Python 3",
349352
"language": "python",
350353
"name": "python3"
351354
},
@@ -359,7 +362,7 @@
359362
"name": "python",
360363
"nbconvert_exporter": "python",
361364
"pygments_lexer": "ipython3",
362-
"version": "3.9.18"
365+
"version": "3.10.11"
363366
}
364367
},
365368
"nbformat": 4,

0 commit comments

Comments
 (0)