Skip to content

join threads on tests #592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 3, 2021
Merged

join threads on tests #592

merged 3 commits into from
Feb 3, 2021

Conversation

DvirDukhan
Copy link
Collaborator

No description provided.

@@ -771,6 +771,7 @@ def run():
# assert that result tensor exists
ret = con.execute_command("EXISTS {}".format(result_tensor_keyname))
env.assertEqual(ret, 1)
t.join()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't you want to join even before(line 763)? Is there a way to verify that batching actually occurred?

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

env.assertEqual(argmax, 1)
t.join()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same question here

@@ -284,6 +284,7 @@ def run():
exception = e
env.assertEqual(type(exception), redis.exceptions.ResponseError)
env.assertEqual("Model did not generate the expected batch size", exception.__str__())
t.join()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would add "env.assertTrue(False)" after lines 274 and 282, otherwise the test doesn't guarantee that those exceptions were raised...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ret = con.execute_command('AI.MODELRUN', 'm{1}', 'INPUTS', 'd{1}', 'e{1}', 'OUTPUTS', 'f1{1}', 'f2{1}')
env.assertEqual(ret, b'OK')

as a single call might succeed, depends on the threads timing

lantiga
lantiga previously approved these changes Feb 3, 2021
@codecov
Copy link

codecov bot commented Feb 3, 2021

Codecov Report

Merging #592 (fbc0167) into master (130ed18) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #592   +/-   ##
=======================================
  Coverage   74.33%   74.33%           
=======================================
  Files          39       39           
  Lines        6062     6062           
=======================================
  Hits         4506     4506           
  Misses       1556     1556           

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 130ed18...fbc0167. Read the comment docs.

@DvirDukhan DvirDukhan merged commit 8bb0735 into master Feb 3, 2021
@DvirDukhan DvirDukhan deleted the thread_join_on_tests branch February 3, 2021 22:57
@chayim chayim mentioned this pull request Jul 22, 2021
@chayim chayim mentioned this pull request Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants