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
Tests for BatchDatasetOp #27876
Tests for BatchDatasetOp #27876
Conversation
4f97f4c
to
cf68000
Compare
DatasetOpsTestBase::CreateTensor<int64>(TensorShape({}), {2}), | ||
/*drop_remainder*/ | ||
DatasetOpsTestBase::CreateTensor<bool>(TensorShape({}), {false}), | ||
/*op_version*/ 1, |
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.
you do not have to write for op_version 1 as it is not used anywhere
@@ -114,8 +114,14 @@ class BatchDatasetOp : public UnaryDatasetOpKernel { | |||
TF_RETURN_IF_ERROR(b->AddScalar(batch_size_, &batch_size)); | |||
Node* drop_remainder = nullptr; | |||
TF_RETURN_IF_ERROR(b->AddScalar(drop_remainder_, &drop_remainder)); | |||
TF_RETURN_IF_ERROR(b->AddDataset( | |||
this, {input_graph_node, batch_size, drop_remainder}, output)); | |||
if (type_string() == "BatchDataset") { |
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.
as per my comment in the test file, please undo this change
b22ebf9
to
bed7023
Compare
The failure log for the test |
The |
Thanks @gbaned for re-triggering the tests. Recently, some changes (0c23c60#diff-79a93a3e76fded5f3522ad99b27976fd) were added to |
@feihugis Any update please? Thanks! |
@gbaned Sorry for the delay as a conference these two days. Will fix the issue today. |
bed7023
to
6e7399a
Compare
@jsimsa @gbaned The new attr |
@jsimsa |
PiperOrigin-RevId: 246524973
This PR enables AsGraphDefInternal to work with two versions of BatchDatasetOp and adds tests for
BatchDatasetOp
.cc: @jsimsa