Skip to content

Conversation

@alonre24
Copy link
Collaborator

Introduce a new version of RDB decoding, v2. The change is in RAI_ModelType, where we now load to RDB the minbatchtimeout of a model (in addition to the rest of the model fields). Model that were encoded using v1 will be decoded with the v1 "old" decode callback.
AI.MODELGET (META) command now returns the value of the model minbatchtimeout field at the end of the meta-data array.

@alonre24 alonre24 requested a review from DvirDukhan May 18, 2021 10:19
@codecov
Copy link

codecov bot commented May 18, 2021

Codecov Report

Merging #749 (4ea924a) into master (ffbf441) will decrease coverage by 0.56%.
The diff coverage is 56.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #749      +/-   ##
==========================================
- Coverage   79.38%   78.82%   -0.57%     
==========================================
  Files          48       49       +1     
  Lines        7476     7650     +174     
==========================================
+ Hits         5935     6030      +95     
- Misses       1541     1620      +79     
Impacted Files Coverage Δ
.../serialization/RDB/decoder/previous/v1/decode_v1.c 64.63% <ø> (ø)
...c/serialization/RDB/decoder/current/v2/decode_v2.c 52.12% <52.12%> (ø)
src/serialization/RDB/decoder/rai_rdb_decoder.c 66.66% <66.66%> (-33.34%) ⬇️
src/redisai.c 85.46% <100.00%> (+0.03%) ⬆️
src/serialization/RDB/decoder/decode_previous.c 75.00% <100.00%> (+8.33%) ⬆️
src/serialization/RDB/encoder/rai_rdb_encode.c 100.00% <100.00%> (ø)
src/serialization/RDB/encoder/v2/encode_v2.c 89.28% <100.00%> (ø)
src/redis_ai_types/script_type.c 65.00% <0.00%> (-5.00%) ⬇️
src/execution/execution_contexts/modelRun_ctx.c 80.55% <0.00%> (+1.85%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25c3347...4ea924a. Read the comment docs.

Comment on lines 174 to 177
tf_model = load_file_content('graph.pb')
con.execute_command('AI.MODELSTORE', key_name, 'TF', 'CPU', 'TAG', "TF_GRAPH_V2", 'BATCHSIZE', 4,
'MINBATCHSIZE', 2, 'MINBATCHTIMEOUT', 1000, 'INPUTS', 2, 'a', 'b', 'OUTPUTS', 1, 'mul',
'BLOB', tf_model)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to do this
you just need to load the rdb

Comment on lines 188 to 190
torch_model = load_file_content('pt-minimal.pt')
con.execute_command('AI.MODELSTORE', key_name, 'TORCH', 'CPU', 'TAG', "PT_MINIMAL_V2", 'BATCHSIZE', 4,
'MINBATCHSIZE', 2, 'MINBATCHTIMEOUT', 1000, 'BLOB', torch_model)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to do this
you just need to load the rdb

Comment on lines 210 to 211
onnx_model = load_file_content('linear_iris.onnx')
con.execute_command('AI.MODELSTORE', key_name, 'ONNX', 'CPU', 'TAG', "ONNX_LINEAR_IRIS_V2", 'BATCHSIZE', 4,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to do this
you just need to load the rdb

@alonre24 alonre24 added ci-test and removed ci-test labels May 18, 2021
@alonre24 alonre24 merged commit 40cb927 into master May 19, 2021
@alonre24 alonre24 deleted the new_model_encoding_version branch May 19, 2021 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants