-
Notifications
You must be signed in to change notification settings - Fork 74k
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 the flaky issue in ParallelInterleaveDatasetOpTest #27805
Fix the flaky issue in ParallelInterleaveDatasetOpTest #27805
Conversation
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.
Should all roundtrip tests include this fix?
Yes, the roundtrip test for |
This fix is added to all roundtrip tests via edb84f2. |
@@ -536,6 +536,8 @@ TEST_P(ParameterizedConcatenateDatasetOpTest, Roundtrip) { | |||
TF_EXPECT_OK(iterator->Save(serialization_ctx.get(), &writer)); | |||
TF_EXPECT_OK(writer.Flush()); | |||
VariantTensorDataReader reader(&data); | |||
TF_ASSERT_OK(concatenate_dataset->MakeIterator(iterator_ctx.get(), |
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.
Please create a test utility (in the test base) for restoring an iterator that makes sure the iterator is reset and it its docstring explain why it is needed. Then apply this utility everywhere (instead of the current error prone pattern that expect that the test writer understand they need to call MakeIterator before Restore). Thanks.
7662c18
to
9a86868
Compare
Good suggestion! I change it via this commit (9a86868). Could you please have a look at the change? |
The test failure in |
…etOpTest PiperOrigin-RevId: 243648524
This PR fixes the flaky issue in ParallelInterleaveDatasetOpTest. We reset the iterator before restoring it so that all the resources/tasks the old iterator holds can be released.
cc:@jsimsa