Skip to content

Commit ad55959

Browse files
author
DvirDukhan
committed
fixed PR comments
1 parent fbc0167 commit ad55959

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

tests/flow/tests_dag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ def run():
761761
'AI.TENSORGET', result_tensor_keyname, 'META',
762762
)
763763

764+
t.join()
764765
ensureSlaveSynced(con, env)
765766

766767
env.assertEqual([b'OK',b'OK',[b'dtype', b'FLOAT', b'shape', [1, 2]]], ret)
@@ -771,7 +772,6 @@ def run():
771772
# assert that result tensor exists
772773
ret = con.execute_command("EXISTS {}".format(result_tensor_keyname))
773774
env.assertEqual(ret, 1)
774-
t.join()
775775

776776

777777
def test_dag_with_timeout(env):

tests/flow/tests_onnx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ def run():
214214
t.start()
215215

216216
con.execute_command('AI.MODELRUN', 'm{1}', 'INPUTS', 'a{1}', 'OUTPUTS', 'b{1}')
217+
t.join()
217218

218219
ensureSlaveSynced(con, env)
219220

@@ -229,7 +230,6 @@ def run():
229230
argmax = max(range(len(values)), key=lambda i: values[i])
230231

231232
env.assertEqual(argmax, 1)
232-
t.join()
233233

234234

235235
def test_onnx_modelrun_iris(env):

tests/flow/tests_pytorch.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ def test_pytorch_modelrun_autobatch_badbatch(env):
269269
def run():
270270
con = env.getConnection()
271271
try:
272-
con.execute_command('AI.MODELRUN', 'm{1}', 'INPUTS', 'd{1}', 'e{1}', 'OUTPUTS', 'f1{1}', 'f2{1}')
272+
ret = con.execute_command('AI.MODELRUN', 'm{1}', 'INPUTS', 'd{1}', 'e{1}', 'OUTPUTS', 'f1{1}', 'f2{1}')
273+
env.assertEqual(ret, b'OK')
273274
except Exception as e:
274275
exception = e
275276
env.assertEqual(type(exception), redis.exceptions.ResponseError)
@@ -279,7 +280,8 @@ def run():
279280
t.start()
280281

281282
try:
282-
con.execute_command('AI.MODELRUN', 'm{1}', 'INPUTS', 'a{1}', 'b{1}', 'OUTPUTS', 'c1{1}', 'c2{1}')
283+
ret = con.execute_command('AI.MODELRUN', 'm{1}', 'INPUTS', 'a{1}', 'b{1}', 'OUTPUTS', 'c1{1}', 'c2{1}')
284+
env.assertEqual(ret, b'OK')
283285
except Exception as e:
284286
exception = e
285287
env.assertEqual(type(exception), redis.exceptions.ResponseError)

0 commit comments

Comments
 (0)