-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Next batch of models with removed return_dict #37396
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
base: main
Are you sure you want to change the base?
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
output_attentions: Optional[bool] = None, | ||
output_hidden_states: Optional[bool] = None, | ||
return_dict: Optional[bool] = None, |
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.
Not super related to the PR, but I removed redundant kwargs for get_text_features/get_image_features, which actually has no effect because we return a tensor (not Output) anyway, might be worth adding 🚨🚨🚨 for the PR
output_attentions=False, | ||
output_hidden_states=False, |
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.
passing False
explicitly here instead (see above comment)
@@ -463,7 +463,6 @@ class BertModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixin | |||
if is_torch_available() | |||
else {} | |||
) | |||
fx_compatible = True |
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.
FX compatibility is broken for BERT, ELECTRA, MobileBERT, and RoBERTa. I'm not sure how critical this is. As far as I understand, we dropped FX compatibility for text models previously by adding **kwargs
.
It's a bit strange that FX compatibility is not broken for CLIP, even though it also has the @can_return_tuple
decorator.
What does this PR do?
Continue removing the
return_dict
attribute from the modeling code.