Skip to content
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

[tf.data] graduate choose_from_datasets API from experimental to tf.data.Dataset #51753

Merged

Conversation

@kvignesh1420
Copy link
Member

@kvignesh1420 kvignesh1420 commented Aug 30, 2021

This PR graduates the tf.data.experimental.choose_from_datasets API into tf.data.Dataset.choose_from_datasets by making the following changes:

  • Adds the deprecation decorator for the experimental API.
  • Add the choose_from_datasets() method to DatasetV2 class.
  • Updates example in documentation with new API.
  • Regenerate golden API's.
  • Updated the sample_from_datasets usage in tests.
  • Updated the RELEASE.md file

cc: @aaudiber

@google-cla google-cla bot added the cla: yes label Aug 30, 2021
@kvignesh1420 kvignesh1420 marked this pull request as ready for review Aug 30, 2021
@gbaned gbaned self-assigned this Aug 31, 2021
@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation Aug 31, 2021
@gbaned gbaned requested a review from aaudiber Aug 31, 2021
@kvignesh1420 kvignesh1420 force-pushed the kvignesh1420:graduate-choose-from-datasets branch from b9f00a5 to 7332255 Sep 1, 2021
Copy link
Contributor

@aaudiber aaudiber left a comment

Thanks @kvignesh1420

to set it to `True`. Otherwise, the selected elements start off as
the user intends, but may change as input datasets become empty.
This can be difficult to detect since the dataset starts off looking
correct. Default to `False` for backward compatibility.

This comment has been minimized.

@aaudiber

aaudiber Sep 2, 2021
Contributor

Can we make the default True now? The backward compatibility requirement no longer applies since we are migrating the API. We need to call out the change in default in the release notes and deprecation message, and tell users to set stop_on_empty_dataset=False to get the same as the experimental API.

We should do the same for sample_from_datasets, in a separate CL.

This comment has been minimized.

@kvignesh1420

kvignesh1420 Sep 2, 2021
Author Member

@aaudiber I agree. I have made the necessary changes. Please take a look.

PR Queue automation moved this from Assigned Reviewer to Approved by Reviewer Sep 2, 2021
add tf.data breaking changes to RELEASE.md

fix api compatibility test failure

fix api compatibility test failures
@kvignesh1420 kvignesh1420 force-pushed the kvignesh1420:graduate-choose-from-datasets branch from bcb8fe2 to 1b0f897 Sep 2, 2021
@kvignesh1420
Copy link
Member Author

@kvignesh1420 kvignesh1420 commented Sep 3, 2021

@aaudiber can you please approve the pull request again?

@kvignesh1420
Copy link
Member Author

@kvignesh1420 kvignesh1420 commented Sep 8, 2021

@aaudiber looks like there is an internal check failure. Anything that I can help with? Just wanted to get this merged before the dataset_ops refactor

@copybara-service copybara-service bot merged commit 93d8e92 into tensorflow:master Sep 10, 2021
11 of 15 checks passed
11 of 15 checks passed
@github-actions
PyLint PyLint
Details
@kokoro-team
Linux GPU Internal CI build failed
Details
@kokoro-team
Windows Bazel Internal CI build failed
Details
@kokoro-team
Windows Bazel GPU Internal CI build failed
Details
@copybara-service
feedback/copybara Google internal checks FAILED for runs with create time 2021-09-10T10:49:39.544436986Z.
Details
@kokoro-team
Android Demo App Internal CI build successful
Details
@tensorflow-jenkins
Intel® oneDNN -- Community CI Build oneDNN CI build successful
Details
@kokoro-team
MacOS CPU Python3 Internal CI build successful
Details
@kokoro-team
TFLite Android Demo App Internal CI build successful
Details
@kokoro-team
TFLite CMake Internal CI build successful
Details
@kokoro-team
TFLite iOS Tests Internal CI build successful
Details
@kokoro-team
Ubuntu CPU Internal CI build successful
Details
@kokoro-team
Ubuntu Sanity Internal CI build successful
Details
@google-cla
cla/google All necessary CLAs are signed
@copybara-service
import/copybara Change imported to the internal review system
Details
PR Queue automation moved this from Approved by Reviewer to Merged Sep 10, 2021
@kvignesh1420 kvignesh1420 deleted the kvignesh1420:graduate-choose-from-datasets branch Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
PR Queue
  
Merged
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants