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 crash of tf.strings.substr when pos and len have different shapes #46974
Merged
copybara-service
merged 1 commit into
tensorflow:master
from
yongtang:46900-tf.strings.substr
Feb 9, 2021
Merged
Fix crash of tf.strings.substr when pos and len have different shapes #46974
copybara-service
merged 1 commit into
tensorflow:master
from
yongtang:46900-tf.strings.substr
Feb 9, 2021
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
This PR tries to address the issue raised in 46900 where tf.strings.substr will crash when pos and len have different shapes. According to the documentation of tf.strings.substr, ValueError should be raised instead when pos and len does not have the same shape. This PR add shape check in kernel to allows grace error throw (instead of crash). This PR fixes 46900. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
mihaimaruseac
approved these changes
Feb 8, 2021
google-ml-butler
bot
added
kokoro:force-run
Tests on submitted change
ready to pull
PR ready for merge process
labels
Feb 8, 2021
geetachavan1
added a commit
to geetachavan1/tensorflow
that referenced
this pull request
May 19, 2021
…en pos and len have different shapes
geetachavan1
added a commit
to geetachavan1/tensorflow
that referenced
this pull request
May 19, 2021
…en pos and len have different shapes
geetachavan1
added a commit
to geetachavan1/tensorflow
that referenced
this pull request
May 19, 2021
…en pos and len have different shapes
geetachavan1
added a commit
to geetachavan1/tensorflow
that referenced
this pull request
May 19, 2021
…en pos and len have different shapes
mihaimaruseac
added a commit
that referenced
this pull request
May 19, 2021
CherryPick:2.1:PR #46974: Fix crash of tf.strings.substr when pos and len have different shapes
mihaimaruseac
added a commit
that referenced
this pull request
May 19, 2021
CherryPick:2.2:PR #46974: Fix crash of tf.strings.substr when pos and len have different shapes
mihaimaruseac
added a commit
that referenced
this pull request
May 19, 2021
CherryPick:2.3:PR #46974: Fix crash of tf.strings.substr when pos and len have different shapes
mihaimaruseac
added a commit
that referenced
this pull request
May 19, 2021
CherryPick:2.4:PR #46974: Fix crash of tf.strings.substr when pos and len have different shapes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cla: yes
prtype:bugfix
PR to fix a bug
ready to pull
PR ready for merge process
size:S
CL Change Size: Small
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 PR tries to address the issue raised in #46900 where
tf.strings.substr will crash when pos and len have different shapes.
According to the documentation of tf.strings.substr, ValueError
should be raised instead when pos and len does not have the same shape.
This PR add shape check in kernel to allows grace error throw (instead of crash).
This PR fixes #46900.
Signed-off-by: Yong Tang yong.tang.github@outlook.com