Skip to content

Commit 004d62a

Browse files
authored
[FSTORE-1666][APPEND] Import transformations functions from Hopsworks API in tutorials so that they are compatible with all project in APP (#317)
* importing transformation functions from hopsworks API for all tutorials * importing transformation functions from hopsworks API for all tutorials
1 parent a5a49f5 commit 004d62a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

real-time-ai-systems/fraud_online/2_fraud_online_training_pipeline.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@
160160
"metadata": {},
161161
"outputs": [],
162162
"source": [
163-
"# Load the transformation functions.\n",
164-
"label_encoder = fs.get_transformation_function(name=\"label_encoder\")\n",
163+
"# Import transformation functions from Hopsworks.\n",
164+
"from hopsworks.hsfs.builtin_transformations import label_encoder\n",
165165
"\n",
166166
"# Map features to transformation functions.\n",
167167
"transformation_functions = [\n",
@@ -192,7 +192,7 @@
192192
" version=1,\n",
193193
" query=selected_features,\n",
194194
" labels=[\"fraud_label\"],\n",
195-
" transformation_functions=[label_encoder(\"country\"), label_encoder(\"gender\")],\n",
195+
" transformation_functions=transformation_functions,\n",
196196
" logging_enabled=True\n",
197197
")"
198198
]

real-time-ai-systems/timeseries/2_training_pipeline.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@
117117
"metadata": {},
118118
"outputs": [],
119119
"source": [
120-
"# Load transformation function\n",
121-
"min_max_scaler = fs.get_transformation_function(name=\"min_max_scaler\")\n",
120+
"# Import transformation functions from Hopsworks.\n",
121+
"from hopsworks.hsfs.builtin_transformations import min_max_scaler\n",
122122
"\n",
123123
"# Define a list of feature names\n",
124124
"feature_names = [\n",

0 commit comments

Comments
 (0)