Skip to content

Commit 7a96c73

Browse files
committed
Add README back
1 parent 8ba3ec5 commit 7a96c73

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# RedisAI
2+
3+
A Redis module for serving tensors and executing deep learning graphs.
4+
Expect changes in the API and internals.
5+
6+
## Cloning
7+
If you want to run examples, make sure you have [git-lfs](https://git-lfs.github.com) installed when you clone.
8+
9+
## Building
10+
This will checkout and build Redis and download the libtensorflow binaries for your platform.
11+
```
12+
bash get_deps.sh
13+
make install
14+
```
15+
16+
## Running the server
17+
```
18+
make run
19+
```
20+
21+
## Running tests
22+
Tests are in the works, there's just a check script (requires Python 3.6.x)
23+
Make sure the server is running, then
24+
```
25+
cd examples/models
26+
# build a graph and write it out
27+
python tf-minimal.py
28+
```
29+
30+
On the client, load the graph
31+
```
32+
./deps/redis/src/redis-cli -x AI.SET GRAPH foo TF < graph.pb
33+
```
34+
35+
Then create the input tensors, run the computation graph and get the output tensor (see `load_model.sh`). Note the signatures:
36+
* `AI.SET TENSOR tensor_key data_type ndims dim1..dimN [BLOB data | VALUES val1..valN]`
37+
* `AI.RUN GRAPH graph_key ninputs input_key input_name_in_graph ... output_key output_name_in_graph ...`
38+
```
39+
redis-cli
40+
> AI.SET TENSOR bar FLOAT 1 2 VALUES 2 3
41+
> AI.SET TENSOR baz FLOAT 1 2 VALUES 2 3
42+
> AI.RUN GRAPH foo 2 bar a baz b jez c
43+
> AI.GET TENSOR jez VALUES
44+
1) FLOAT
45+
2) (integer) 1
46+
3) 1) (integer) 2
47+
4) (integer) 8
48+
5) 1) "2"
49+
2) "3"
50+
```
51+
52+
### AI.SET TENSOR tensor_key data_type dim shape1..shapeN [BLOB data | VALUES val1..valN]
53+
Stores a tensor of defined type (FLOAT, DOUBLE, INT8, INT16, INT32, INT64, UINT8, UINT16) with N dimensions (dim) and shape given by shape1..shapeN
54+
55+
### AI.SET GRAPH graph_key backend graph_blob prefix
56+
Stores a graph provided as a protobuf blob. Backend is TF for now.
57+
58+
### AI.GET TENSOR tensor_key [BLOB | VALUES | META]
59+
60+
### AI.RUN GRAPH graph_key ninputs input_key input_name_in_graph ... output_key output_name_in_graph ...
61+
62+
63+
## License
64+
65+
AGPL-3.0 https://opensource.org/licenses/AGPL-3.0
66+
67+
Copyright 2018, Orobix Srl & Redis Labs

0 commit comments

Comments
 (0)