Skip to content

Commit 81a7ee9

Browse files
author
DvirDukhan
committed
fixed tests messages
1 parent cad07af commit 81a7ee9

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

src/model.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -177,22 +177,6 @@ static void RAI_Model_AofRewrite(RedisModuleIO *aof, RedisModuleString *key, voi
177177
outputs_ = array_append(outputs_, RedisModule_CreateString(ctx, model->outputs[i], strlen(model->outputs[i])));
178178
}
179179

180-
<<<<<<< HEAD
181-
=======
182-
long long chunk_size = getModelChunkSize();
183-
const size_t n_chunks = len / chunk_size + 1;
184-
RedisModuleString **buffers_ = array_new(RedisModuleString*, n_chunks);
185-
186-
for (size_t i=0; i<n_chunks; i++) {
187-
size_t chunk_len = i < n_chunks - 1 ? chunk_size : len % chunk_size;
188-
buffers_ = array_append(buffers_, RedisModule_CreateString(ctx, buffer + i * chunk_size, chunk_len));
189-
}
190-
191-
if (buffer) {
192-
RedisModule_Free(buffer);
193-
}
194-
195-
>>>>>>> 4f51679... Safely add to arrays + fix for #443 (#449)
196180
const char* backendstr = RAI_BackendName(model->backend);
197181

198182
RedisModule_EmitAOF(aof, "AI.MODELSET", "slccclclcvcvb",

test/tests_dag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def test_dag_scriptrun_errors(env):
270270
except Exception as e:
271271
exception = e
272272
env.assertEqual(type(exception), redis.exceptions.ResponseError)
273-
env.assertEqual("ERR unsupported command within DAG",exception.__str__())
273+
env.assertEqual("function name not specified", exception.__str__())
274274

275275

276276
def test_dag_modelrun_financialNet_errors(env):
@@ -305,7 +305,7 @@ def test_dag_modelrun_financialNet_errors(env):
305305
except Exception as e:
306306
exception = e
307307
env.assertEqual(type(exception), redis.exceptions.ResponseError)
308-
env.assertEqual("ERR unsupported command within DAG",exception.__str__())
308+
env.assertEqual("Number of names given as INPUTS during MODELSET and keys given as INPUTS here do not match", exception.__str__())
309309

310310

311311
def test_dag_local_tensorset(env):

test/tests_tensorflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def test_run_tf_model_errors(env):
458458
except Exception as e:
459459
exception = e
460460
env.assertEqual(type(exception), redis.exceptions.ResponseError)
461-
env.assertEqual("tensor key is empty", exception.__str__())
461+
env.assertEqual("Number of names given as OUTPUTS during MODELSET and keys given as OUTPUTS here do not match", exception.__str__())
462462

463463
try:
464464
con.execute_command('AI.MODELRUN', 'm{1}', 'OUTPUTS', 'c{1}')

0 commit comments

Comments
 (0)