-
Notifications
You must be signed in to change notification settings - Fork 149
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
Fix test_cohereInference_withDifferent_postProcessFunction flaky test #3666
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Nathalie Jonathan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nathaliellenaa for picking this up. LGTM, let's see if the integ pass and verify this fix.
after this PR is merged, you can rebase your the other branch and push again, it should unblock your another PR
@@ -78,7 +78,9 @@ public void test_cohereInference_withDifferent_postProcessFunction() { | |||
List output = (List) inferenceResult.get("inference_results"); | |||
assertEquals(errorMsg, 1, output.size()); | |||
assertTrue(errorMsg, output.get(0) instanceof Map); | |||
validateOutput(errorMsg, (Map) output.get(0), DATA_TYPE.get(postProcessFunction)); | |||
if (output != null && DATA_TYPE != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DATA_TYPE
is a static variable which already have values in it. So checking null for DATA_TYPE isn't adding any value because it will not be null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I'll remove the null check for DATA_TYPE.
Signed-off-by: Nathalie Jonathan <[email protected]>
@@ -78,7 +78,9 @@ public void test_cohereInference_withDifferent_postProcessFunction() { | |||
List output = (List) inferenceResult.get("inference_results"); | |||
assertEquals(errorMsg, 1, output.size()); | |||
assertTrue(errorMsg, output.get(0) instanceof Map); | |||
validateOutput(errorMsg, (Map) output.get(0), DATA_TYPE.get(postProcessFunction)); | |||
if (output != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here adding null check for output won't make any difference. If output is null, it would have thrown NullPointerException at line number 79 - output.size().
Here actual issue is in line number 91, outputList.get(0)).get("data_type"). This is becoming null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this PR as the failure IT should already fixed, please check this comment: #3628 (comment)
Description
Fix
test_cohereInference_withDifferent_postProcessFunction
flaky test due toRelated Issues
Resolves #3628 (comment)
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.