-
Notifications
You must be signed in to change notification settings - Fork 580
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
RFC: Supporting tf.function in tf.transform #308
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Oct 22, 2020
…#308) to current RFCs PiperOrigin-RevId: 338501234
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Oct 26, 2020
…#308) to current RFCs PiperOrigin-RevId: 338501234
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Oct 26, 2020
…#308) to current RFCs PiperOrigin-RevId: 338501234
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Oct 26, 2020
…#308) to current RFCs PiperOrigin-RevId: 339095570
ematejska
approved these changes
Nov 9, 2020
There has been no feedback, this is now accepted. |
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Nov 9, 2020
PiperOrigin-RevId: 341430132
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Nov 10, 2020
PiperOrigin-RevId: 341430132
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Nov 10, 2020
PiperOrigin-RevId: 341430132
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Nov 11, 2020
PiperOrigin-RevId: 341430132
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Nov 11, 2020
PiperOrigin-RevId: 341430132
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Nov 11, 2020
PiperOrigin-RevId: 341892461
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Dec 6, 2020
Implements RFC: tensorflow/community#308 PiperOrigin-RevId: 345978930
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Dec 6, 2020
Implements RFC: tensorflow/community#308 PiperOrigin-RevId: 345978930
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Dec 6, 2020
Implements RFC: tensorflow/community#308 PiperOrigin-RevId: 345978930
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Dec 6, 2020
Implements RFC: tensorflow/community#308 PiperOrigin-RevId: 345978930
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Dec 6, 2020
Implements RFC: tensorflow/community#308 PiperOrigin-RevId: 345978930
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Dec 7, 2020
Implements RFC: tensorflow/community#308 PiperOrigin-RevId: 345978930
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Dec 7, 2020
Implements RFC: tensorflow/community#308 PiperOrigin-RevId: 345978930
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Dec 7, 2020
Implements RFC: tensorflow/community#308 PiperOrigin-RevId: 345978930
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Dec 11, 2020
Implements RFC: tensorflow/community#308 PiperOrigin-RevId: 345978930
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Dec 12, 2020
Implements RFC: tensorflow/community#308 PiperOrigin-RevId: 345978930
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Dec 12, 2020
Implements RFC: tensorflow/community#308 PiperOrigin-RevId: 345978930
copybara-service bot
pushed a commit
to tensorflow/tfx
that referenced
this pull request
Dec 12, 2020
Implements RFC: tensorflow/community#308 PiperOrigin-RevId: 347120003
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This RFC will be open for comment until Friday, November 6th, 2020.
cc @jsimsa @zoyahav @katsiapis
Objective
For tf.transform users who have TF 2 features enabled, tf.transform will
internally use tf.function to trace the user defined preprocessing function.
This is expected to work for the majority of existing use cases with no user
visible impact. However, it is possible that the user defined preprocessing
function is not traceable by tf.function (i.e. not compatible with TF 2 graph
mode execution). To accommodate such cases, we will provide a
force_tf_compat_v1
escape hatch to allow users to fall back to TF 1compatibility mode. Keeping the legacy behavior will continue to write the
output artifact as a TF 1 SavedModel and is not guaranteed to be compatible with
V2 Trainer.
To support this change, we need to allow tf.transform analyzers to be traceable
by tf.function. Additionally, for tf.transform to support tf.function usage
completely, it needs to handle nested tf.functions that could by themselves
contain tf.transform analyzers. tf.transform currently only traverses a single
graph generated from the user defined preprocessing function. To support nested
tf.functions, tf.transform will need to recursively traverse all the nested
FuncGraphs, identifying tf.transform analyzer nodes and replacing them with
their final computed value.
A side-effect of this proposal is that the output artifact created by
tf.transform when tf.function is used to trace the preprocessing function will
be a V2 SavedModel.