You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The execution of models will generate intermediate tensors that are not allocated by the Redis allocator, but by whatever allocator is used in the backends (which may act on main memory or GPU memory, depending on the device), thus not being limited by maxmemory settings on Redis.
166
253
---
167
254
168
-
## AI._MODELLIST
255
+
## AI._MODELSCAN
169
256
170
-
NOTE: `_MODELLIST` is EXPERIMENTAL and might be removed in future versions.
257
+
NOTE: `_MODELSCAN` is EXPERIMENTAL and might be removed in future versions.
171
258
172
259
List all models. Returns a list of (key, tag) pairs.
173
260
174
261
```sql
175
-
AI._MODELLIST
262
+
AI._MODELSCAN
176
263
```
177
264
178
-
### _MODELLIST Example
265
+
### _MODELSCAN Example
179
266
180
267
```sql
181
268
AI.MODELSET model1 TORCH GPU TAG resnet18:v1 <foo.pt
182
269
AI.MODELSET model2 TORCH GPU TAG resnet18:v2 <bar.pt
* META - Return information on backend, device and tag
322
+
* SOURCE - Return string containing the source code for the script
323
+
324
+
The command returns a list of key-value strings, namely `device <device> tag <tag> [source <source>]`.
325
+
326
+
### SCRIPTGET Example
327
+
328
+
```sql
329
+
AI.SCRIPTGET addtwo META
330
+
331
+
>1) "device"
332
+
>2) "CPU"
333
+
>3) "tag"
334
+
>4) "v1.0"
335
+
```
336
+
337
+
```sql
338
+
AI.SCRIPTGET addtwo SOURCE
339
+
340
+
> ...
341
+
```
342
+
343
+
```sql
344
+
AI.SCRIPTGET addtwo META SOURCE
345
+
346
+
>3) "device"
347
+
>4) "CPU"
348
+
>5) "tag"
349
+
>6) "v1.0"
350
+
>7) "source"
351
+
>8) ...
352
+
```
234
353
235
-
The command returns a list of key-value strings, namely `DEVICE device TAG tag [SOURCE source]`.
236
354
237
355
## AI.SCRIPTDEL
238
356
@@ -247,12 +365,6 @@ AI.SCRIPTDEL script_key
247
365
Currently, the command is fully equivalent to calling `DEL` on `script_key`.
248
366
249
367
250
-
### SCRIPTGET Example
251
-
252
-
```sql
253
-
AI.SCRIPTGET addscript
254
-
```
255
-
256
368
## AI.SCRIPTRUN
257
369
258
370
Run a script.
@@ -279,23 +391,23 @@ AI.SCRIPTRUN addscript addtwo INPUTS a b OUTPUTS c
279
391
The execution of models will generate intermediate tensors that are not allocated by the Redis allocator, but by whatever allocator is used in the backends (which may act on main memory or GPU memory, depending on the device), thus not being limited by maxmemory settings on Redis.
280
392
---
281
393
282
-
## AI._SCRIPTLIST
394
+
## AI._SCRIPTSCAN
283
395
284
-
NOTE: `_SCRIPTLIST` is EXPERIMENTAL and might be removed in future versions.
396
+
NOTE: `_SCRIPTSCAN` is EXPERIMENTAL and might be removed in future versions.
285
397
286
398
List all scripts. Returns a list of (key, tag) pairs.
287
399
288
400
```sql
289
-
AI._SCRIPTLIST
401
+
AI._SCRIPTSCAN
290
402
```
291
403
292
-
### _SCRIPTLIST Example
404
+
### _SCRIPTSCAN Example
293
405
294
406
```sql
295
407
AI.SCRIPTSET script1 GPU TAG addtwo:v0.1<addtwo.txt
296
408
AI.SCRIPTSET script2 GPU TAG addtwo:v0.2<addtwo.txt
297
409
298
-
AI._SCRIPTLIST
410
+
AI._SCRIPTSCAN
299
411
300
412
>1) 1) "script1"
301
413
>1) 2) "addtwo:v0.1"
@@ -312,14 +424,14 @@ At each `MODELRUN` or `SCRIPTRUN`, RedisAI will collect statistcs specific for e
312
424
specific for the node (hence nodes in a cluster will have to be queried individually for their info).
313
425
The following information is collected:
314
426
315
-
-`KEY`: the key being run
316
-
-`TYPE`: either `MODEL` or `SCRIPT`
317
-
-`BACKEND`: the type of backend (always `TORCH` for `SCRIPT`)
318
-
-`DEVICE`: the device where the run has been executed
319
-
-`DURATION`: cumulative duration in microseconds
320
-
-`SAMPLES`: cumulative number of samples obtained from the 0-th (batch) dimension (for `MODEL` only)
321
-
-`CALLS`: number of calls
322
-
-`ERRORS`: number of errors generated after the run has been submitted (i.e. excluding errors generated during parsing of the command)
427
+
-`key`: the key being run
428
+
-`type`: either `MODEL` or `SCRIPT`
429
+
-`backend`: the type of backend (always `TORCH` for `SCRIPT`)
430
+
-`device`: the device where the run has been executed
431
+
-`duration`: cumulative duration in microseconds
432
+
-`samples`: cumulative number of samples obtained from the 0-th (batch) dimension (for `MODEL` only)
433
+
-`calls`: number of calls
434
+
-`errors`: number of errors generated after the run has been submitted (i.e. excluding errors generated during parsing of the command)
323
435
324
436
```sql
325
437
AI.INFO<model_or_script_key>
@@ -338,21 +450,21 @@ The command can be called on a key until that key is removed using `MODELDEL` or
0 commit comments