Skip to content

Commit 999fef6

Browse files
author
hhsecond
committed
review feedback
1 parent 81643d1 commit 999fef6

File tree

1 file changed

+15
-31
lines changed

1 file changed

+15
-31
lines changed

ImageClassificationWithPytorch.ipynb

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
{
1313
"cell_type": "code",
14-
"execution_count": 28,
14+
"execution_count": 1,
1515
"id": "1e657632",
1616
"metadata": {},
1717
"outputs": [],
@@ -40,7 +40,7 @@
4040
},
4141
{
4242
"cell_type": "code",
43-
"execution_count": 29,
43+
"execution_count": 2,
4444
"id": "56edea97",
4545
"metadata": {},
4646
"outputs": [],
@@ -69,7 +69,7 @@
6969
},
7070
{
7171
"cell_type": "code",
72-
"execution_count": 31,
72+
"execution_count": 3,
7373
"id": "59b6599a",
7474
"metadata": {},
7575
"outputs": [
@@ -79,7 +79,7 @@
7979
"True"
8080
]
8181
},
82-
"execution_count": 31,
82+
"execution_count": 3,
8383
"metadata": {},
8484
"output_type": "execute_result"
8585
}
@@ -104,7 +104,7 @@
104104
},
105105
{
106106
"cell_type": "code",
107-
"execution_count": 32,
107+
"execution_count": 4,
108108
"id": "f7ddde68",
109109
"metadata": {},
110110
"outputs": [
@@ -114,7 +114,7 @@
114114
"'OK'"
115115
]
116116
},
117-
"execution_count": 32,
117+
"execution_count": 4,
118118
"metadata": {},
119119
"output_type": "execute_result"
120120
}
@@ -142,7 +142,7 @@
142142
},
143143
{
144144
"cell_type": "code",
145-
"execution_count": 8,
145+
"execution_count": 5,
146146
"id": "50bb90b1",
147147
"metadata": {},
148148
"outputs": [
@@ -152,7 +152,7 @@
152152
"'OK'"
153153
]
154154
},
155-
"execution_count": 8,
155+
"execution_count": 5,
156156
"metadata": {},
157157
"output_type": "execute_result"
158158
}
@@ -189,7 +189,7 @@
189189
},
190190
{
191191
"cell_type": "code",
192-
"execution_count": null,
192+
"execution_count": 6,
193193
"id": "fe95d716",
194194
"metadata": {},
195195
"outputs": [],
@@ -213,7 +213,7 @@
213213
},
214214
{
215215
"cell_type": "code",
216-
"execution_count": 49,
216+
"execution_count": 7,
217217
"id": "f24ce05d",
218218
"metadata": {},
219219
"outputs": [
@@ -231,7 +231,7 @@
231231
"con.modelexecute('pytorch_model', 'processed', 'model_out')\n",
232232
"con.scriptexecute('processing_script', 'post_process', inputs='model_out', outputs='final')\n",
233233
"final = con.tensorget('final')\n",
234-
"print(final[0], class_idx[str(ind[0])])"
234+
"print(final[0], class_idx[str(final[0])])"
235235
]
236236
},
237237
{
@@ -240,12 +240,12 @@
240240
"metadata": {},
241241
"source": [
242242
"## Running with DAG\n",
243-
"Although this looks good, each of these calls has a network overhead of going back and forth and sometimes it's better to run everything as a single execution and that's what you can do with RedisAI DAG. DAGs are much more powerful than that but let's discuss that in another tutorial. Here we first setup a dag object and track all the operations we did above in the dag. Note that none of these tracking steps sends a request to RedisAI server. Once the dag object is ready with all the paths, you can trigger `dag.run()` to initiate the DAG execution in RedisAI backend"
243+
"Although this looks good, each of these calls has a network overhead of going back and forth and sometimes it's better to run everything as a single execution and that's what you can do with RedisAI DAG. DAGs are much more powerful than that but let's discuss that in another tutorial. Here we first setup a dag object and track all the operations we did above in the dag. Note that none of these tracking steps sends a request to RedisAI server. Once the dag object is ready with all the paths, you can trigger `dag.execute()` to initiate the DAG execution in RedisAI backend"
244244
]
245245
},
246246
{
247247
"cell_type": "code",
248-
"execution_count": 51,
248+
"execution_count": 8,
249249
"id": "40e02215",
250250
"metadata": {},
251251
"outputs": [
@@ -255,14 +255,6 @@
255255
"text": [
256256
"281 tabby, tabby catamount\n"
257257
]
258-
},
259-
{
260-
"name": "stderr",
261-
"output_type": "stream",
262-
"text": [
263-
"/var/folders/66/g3bgwk8s0mq9fmm1d32nmb8c0000gq/T/ipykernel_16269/3084769917.py:8: DeprecationWarning: Call to deprecated method run. (Use execute instead) -- Deprecated since version 1.2.0.\n",
264-
" final = dag.run()[-1]\n"
265-
]
266258
}
267259
],
268260
"source": [
@@ -273,17 +265,9 @@
273265
"dag.scriptexecute('processing_script', 'post_process', inputs='model_out', outputs='final')\n",
274266
"dag.tensorget('final')\n",
275267
"\n",
276-
"final = dag.run()[-1]\n",
277-
"print(final[0], class_idx[str(ind[0])])"
268+
"final = dag.execute()[-1]\n",
269+
"print(final[0], class_idx[str(final[0])])"
278270
]
279-
},
280-
{
281-
"cell_type": "code",
282-
"execution_count": null,
283-
"id": "3fd407e5",
284-
"metadata": {},
285-
"outputs": [],
286-
"source": []
287271
}
288272
],
289273
"metadata": {

0 commit comments

Comments
 (0)