String tensor support#832
Conversation
…disAI into string_tensor_support
Codecov Report
@@ Coverage Diff @@
## master #832 +/- ##
==========================================
+ Coverage 79.97% 81.22% +1.24%
==========================================
Files 53 55 +2
Lines 8009 8126 +117
==========================================
+ Hits 6405 6600 +195
+ Misses 1604 1526 -78
Continue to review full report at Codecov.
|
DvirDukhan
left a comment
There was a problem hiding this comment.
please see tensor.h/tensor.c comments
please add:
- script to create onnx model
- DAG tests
- v4 encoding
| size_t RAI_TensorByteSize(RAI_Tensor *t) { | ||
| // TODO: as per dlpack it should be | ||
| // size *= (t->dtype.bits * t->dtype.lanes + 7) / 8; | ||
| // todo: change after verify that blob size is initialized properly |
There was a problem hiding this comment.
This upper TODO is old (Luca?), and I don't really understand what it means. Should I remove it?
About the other todo - will do.
… remove deep copy (not used)
| from onnx import helper, TensorProto, ModelProto, defs | ||
|
|
||
|
|
||
| def make_model(graph, **kwargs): # type: (GraphProto, **Any) -> ModelProto |
There was a problem hiding this comment.
let's validate ONNX versions vs ONNXRuntime versions here please
There was a problem hiding this comment.
Validated - using ONNX 1.8.0 when running this script will create a model that runs properly on ONNXRuntime 1.8.1.
Note that if we use ONNX latest (1.10.1), Opset version is 15, while ONNXRuntime 1.8.1 supports up to 14. I assume that ONNXRumtime will support Opset version 15...
…disAI into string_tensor_support
| redis> AI.TENSORSET mytensor STRING 1 2 VALUES first second | ||
| OK |
There was a problem hiding this comment.
please have a dedicated section regarding strings
how they should be provided by blob and by values.
consider doing so in a different PR involving documentation for BOOL
There was a problem hiding this comment.
OK, will do in a new PR
We introduce string tensor for RedisAI, which are tensors in which every element is a null-terminated string (we support utf-8 format).
This PR adds the following capabilities:
AI_TENSORSET <KEY> string <shape_1> [<shape_2> ...] [BLOB <blob> | VALUES <str_1> ...]todo: