Skip to content

Commit

Permalink
updated with Frameworks.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhansarickWallaroo committed Aug 28, 2023
1 parent 39ccb6d commit 9495f8e
Show file tree
Hide file tree
Showing 34 changed files with 251 additions and 270 deletions.
54 changes: 27 additions & 27 deletions notebooks_in_prod/03_notebooks_in_prod_deploy_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -114,7 +114,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -137,7 +137,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -157,16 +157,16 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': 'housepricing', 'id': 17, 'archived': False, 'created_by': '028c8b48-c39b-4578-9110-0b5bdd3824da', 'created_at': '2023-05-17T21:26:51.743388+00:00', 'models': [], 'pipelines': []}"
"{'name': 'housepricing', 'id': 11, 'archived': False, 'created_by': 'db364f8c-b866-4865-96b7-0b65662cb384', 'created_at': '2023-08-28T16:52:57.579645+00:00', 'models': [], 'pipelines': []}"
]
},
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -178,7 +178,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -197,11 +197,11 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"hpmodel = wl.upload_model(model_name, model_file).configure()"
"hpmodel = wl.upload_model(model_name, model_file, framework=wallaroo.framework.Framework.ONNX).configure()"
]
},
{
Expand All @@ -216,22 +216,22 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"# load the preprocess module\n",
"module_pre = wl.upload_model(\"preprocess\", \"./preprocess.py\").configure('python')"
"module_pre = wl.upload_model(\"preprocess\", \"./preprocess.py\", framework=wallaroo.framework.Framework.PYTHON).configure('python')"
]
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"# load the postprocess module\n",
"module_post = wl.upload_model(\"postprocess\", \"./postprocess.py\").configure('python')"
"module_post = wl.upload_model(\"postprocess\", \"./postprocess.py\", framework=wallaroo.framework.Framework.PYTHON).configure('python')"
]
},
{
Expand All @@ -246,19 +246,19 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table><tr><th>name</th> <td>housing-pipe</td></tr><tr><th>created</th> <td>2023-05-17 21:26:56.133264+00:00</td></tr><tr><th>last_updated</th> <td>2023-05-17 21:26:57.316392+00:00</td></tr><tr><th>deployed</th> <td>True</td></tr><tr><th>tags</th> <td></td></tr><tr><th>versions</th> <td>b7dbd380-e48c-487c-8f23-398a2ba558c3, 5ea6f182-5764-4377-9f83-d363e349ef32</td></tr><tr><th>steps</th> <td>preprocess</td></tr></table>"
"<table><tr><th>name</th> <td>housing-pipe</td></tr><tr><th>created</th> <td>2023-08-28 16:53:31.473346+00:00</td></tr><tr><th>last_updated</th> <td>2023-08-28 16:53:33.168127+00:00</td></tr><tr><th>deployed</th> <td>True</td></tr><tr><th>tags</th> <td></td></tr><tr><th>versions</th> <td>63da191e-93f5-4933-afe5-1c552121d8a0, 45768a6d-0115-4b71-870f-865d479f1b5c</td></tr><tr><th>steps</th> <td>preprocess</td></tr><tr><th>published</th> <td>False</td></tr></table>"
],
"text/plain": [
"{'name': 'housing-pipe', 'create_time': datetime.datetime(2023, 5, 17, 21, 26, 56, 133264, tzinfo=tzutc()), 'definition': \"[{'ModelInference': {'models': [{'name': 'preprocess', 'version': '08efdd6c-6b02-4bee-b0ba-1aa60d260d69', 'sha': 'f6d33da576ec968d126098fd7237f07e2a27354e949c089f3344706f414d4013'}]}}, {'ModelInference': {'models': [{'name': 'housepricemodel', 'version': '5613fdff-8a4d-4321-b750-7904f2ebc168', 'sha': '7404007c88906331c8159c42379f30966a21fd29fe2629049e69541d0083db9a'}]}}, {'ModelInference': {'models': [{'name': 'postprocess', 'version': '38d7d8f2-1054-45bd-9a99-04cd95ce50c8', 'sha': '075f69d5c31ce26ef679fa3944b3e24018f6e65dee559381eb7f4e34d2417daa'}]}}]\"}"
"{'name': 'housing-pipe', 'create_time': datetime.datetime(2023, 8, 28, 16, 53, 31, 473346, tzinfo=tzutc()), 'definition': \"[{'ModelInference': {'models': [{'name': 'preprocess', 'version': 'cf7ff2f6-b821-4db5-9c9b-07f6c9fbb00f', 'sha': 'f6d33da576ec968d126098fd7237f07e2a27354e949c089f3344706f414d4013'}]}}, {'ModelInference': {'models': [{'name': 'housepricemodel', 'version': '55365278-7739-4bb4-9cc9-c1f0ad19c936', 'sha': '7404007c88906331c8159c42379f30966a21fd29fe2629049e69541d0083db9a'}]}}, {'ModelInference': {'models': [{'name': 'postprocess', 'version': 'f8c54fe6-515c-41a9-a16e-3f755334001c', 'sha': '075f69d5c31ce26ef679fa3944b3e24018f6e65dee559381eb7f4e34d2417daa'}]}}]\"}"
]
},
"execution_count": 10,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -287,7 +287,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 13,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -331,7 +331,7 @@
" <tr>\n",
" <th>0</th>\n",
" <td>7129300520</td>\n",
" <td>2022-10-05</td>\n",
" <td>2023-01-14</td>\n",
" <td>221900.0</td>\n",
" <td>3</td>\n",
" <td>1.0</td>\n",
Expand All @@ -344,13 +344,13 @@
],
"text/plain": [
" id date list_price bedrooms bathrooms sqft_living \\\n",
"0 7129300520 2022-10-05 221900.0 3 1.0 1180 \n",
"0 7129300520 2023-01-14 221900.0 3 1.0 1180 \n",
"\n",
" sqft_lot \n",
"0 5650 "
]
},
"execution_count": 2,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -371,7 +371,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -399,19 +399,19 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table><tr><th>name</th> <td>housing-pipe</td></tr><tr><th>created</th> <td>2023-05-17 21:26:56.133264+00:00</td></tr><tr><th>last_updated</th> <td>2023-05-17 21:26:57.316392+00:00</td></tr><tr><th>deployed</th> <td>False</td></tr><tr><th>tags</th> <td></td></tr><tr><th>versions</th> <td>b7dbd380-e48c-487c-8f23-398a2ba558c3, 5ea6f182-5764-4377-9f83-d363e349ef32</td></tr><tr><th>steps</th> <td>preprocess</td></tr></table>"
"<table><tr><th>name</th> <td>housing-pipe</td></tr><tr><th>created</th> <td>2023-08-28 16:53:31.473346+00:00</td></tr><tr><th>last_updated</th> <td>2023-08-28 16:53:33.168127+00:00</td></tr><tr><th>deployed</th> <td>False</td></tr><tr><th>tags</th> <td></td></tr><tr><th>versions</th> <td>63da191e-93f5-4933-afe5-1c552121d8a0, 45768a6d-0115-4b71-870f-865d479f1b5c</td></tr><tr><th>steps</th> <td>preprocess</td></tr><tr><th>published</th> <td>False</td></tr></table>"
],
"text/plain": [
"{'name': 'housing-pipe', 'create_time': datetime.datetime(2023, 5, 17, 21, 26, 56, 133264, tzinfo=tzutc()), 'definition': \"[{'ModelInference': {'models': [{'name': 'preprocess', 'version': '08efdd6c-6b02-4bee-b0ba-1aa60d260d69', 'sha': 'f6d33da576ec968d126098fd7237f07e2a27354e949c089f3344706f414d4013'}]}}, {'ModelInference': {'models': [{'name': 'housepricemodel', 'version': '5613fdff-8a4d-4321-b750-7904f2ebc168', 'sha': '7404007c88906331c8159c42379f30966a21fd29fe2629049e69541d0083db9a'}]}}, {'ModelInference': {'models': [{'name': 'postprocess', 'version': '38d7d8f2-1054-45bd-9a99-04cd95ce50c8', 'sha': '075f69d5c31ce26ef679fa3944b3e24018f6e65dee559381eb7f4e34d2417daa'}]}}]\"}"
"{'name': 'housing-pipe', 'create_time': datetime.datetime(2023, 8, 28, 16, 53, 31, 473346, tzinfo=tzutc()), 'definition': \"[{'ModelInference': {'models': [{'name': 'preprocess', 'version': 'cf7ff2f6-b821-4db5-9c9b-07f6c9fbb00f', 'sha': 'f6d33da576ec968d126098fd7237f07e2a27354e949c089f3344706f414d4013'}]}}, {'ModelInference': {'models': [{'name': 'housepricemodel', 'version': '55365278-7739-4bb4-9cc9-c1f0ad19c936', 'sha': '7404007c88906331c8159c42379f30966a21fd29fe2629049e69541d0083db9a'}]}}, {'ModelInference': {'models': [{'name': 'postprocess', 'version': 'f8c54fe6-515c-41a9-a16e-3f755334001c', 'sha': '075f69d5c31ce26ef679fa3944b3e24018f6e65dee559381eb7f4e34d2417daa'}]}}]\"}"
]
},
"execution_count": 13,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -445,7 +445,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.8.17"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 9495f8e

Please sign in to comment.