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
Copy file name to clipboardExpand all lines: docs/commands.md
+79-2Lines changed: 79 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,6 @@
2
2
3
3
## AI.CONFIG LOADBACKEND
4
4
5
-
### AI.CONFIG LOADBACKEND Example
6
-
7
5
Load a DL/ML backend.
8
6
9
7
By default, RedisAI starts with the ability to set and get tensor data, but setting and running models and scritps requires a computing backend to be loaded. This command allows to dynamically load a backend by specifying the backend identifier and the path to the backend library. Currently, once loaded, a backend cannot be unloaded, and there can be at most one backend per identifier loaded.
It is possible to specify backends at the command-line when starting `redis-server`, see example below.
18
16
17
+
### AI.CONFIG LOADBACKEND Example
18
+
19
19
> Load the TORCH backend
20
20
21
21
```sql
@@ -234,3 +234,80 @@ If needed, input tensors are copied to the device specified in `AI.SCRIPTSET` be
234
234
```sql
235
235
AI.SCRIPTRUN addscript addtwo INPUTS a b OUTPUTS c
236
236
```
237
+
238
+
## AI.INFO
239
+
240
+
Return information about runs of a `MODEL` or a `SCRIPT`.
241
+
242
+
At each `MODELRUN` or `SCRIPTRUN`, RedisAI will collect statistcs specific for each `MODEL` or `SCRIPT`,
243
+
specific for the node (hence nodes in a cluster will have to be queried individually for their info).
244
+
The following information is collected:
245
+
246
+
-`KEY`: the key being run
247
+
-`TYPE`: either `MODEL` or `SCRIPT`
248
+
-`BACKEND`: the type of backend (always `TORCH` for `SCRIPT`)
249
+
-`DEVICE`: the device where the run has been executed
250
+
-`DURATION`: cumulative duration in microseconds
251
+
-`SAMPLES`: cumulative number of samples obtained from the 0-th (batch) dimension (for `MODEL` only)
252
+
-`CALLS`: number of calls
253
+
-`ERRORS`: number of errors generated after the run has been submitted (i.e. excluding errors generated during parsing of the command)
254
+
255
+
```sql
256
+
AI.INFO<model_or_script_key>
257
+
```
258
+
259
+
Statistcs are accumulated until the same command with an extra `RESETSTAT` argument is called. This resets the statistics relative to the model or script.
260
+
261
+
```sql
262
+
AI.INFO<model_or_script_key> RESETSTAT
263
+
```
264
+
265
+
The command can be called on a key until that key is removed using `MODELDEL` or `SCRIPTDEL`.
0 commit comments