-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
TensorFlow CI fixes #24360
TensorFlow CI fixes #24360
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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.
Thanks for fixing!
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.
Thank you @Rocketknight1 ! Works for me, but maybe with one more comment would be nice to reader if there is ever someone want to look our code.
@@ -418,7 +418,8 @@ def build(self, input_shape): | |||
if not self.built: | |||
input_shape = input_shape.as_list() | |||
# Conv1D output shapes are checked at build time since TF 2.7, so we need to account for padding | |||
input_shape[-2] += self.explicit_padding * 2 | |||
if input_shape[-2] is not None: | |||
input_shape[-2] += self.explicit_padding * 2 |
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.
Could we add a short comment to explain why this condition? Even a link to a comment in one of your TF PR would be nice.
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.
Done!
@@ -452,7 +452,8 @@ def build(self, input_shape): | |||
if not self.built: | |||
input_shape = input_shape.as_list() | |||
# Conv1D output shapes are checked at build time since TF 2.7, so we need to account for padding | |||
input_shape[-2] += self.explicit_padding * 2 | |||
if input_shape[-2] is not None: | |||
input_shape[-2] += self.explicit_padding * 2 |
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.
same
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.
Done!
# This fails because the if return_loss: conditional can return None or a Tensor and TF hates that. | ||
# We could fix that by setting the bool to a constant when exporting, but that requires a dedicated export | ||
# function that we don't have yet. |
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.
I love this!
I made a lot of changes to the TF tests, and this exposed a few issues. This PR fixes all the exposed issues, so hopefully after this the only remaining CI issues should be related to generation or the
SharedEmbeddings
refactor.