-
Notifications
You must be signed in to change notification settings - Fork 31.9k
[BLIP] fix doctest
#21217
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
[BLIP] fix doctest
#21217
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
ydshieh
left a comment
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.
LGTM 💯 with -1 --> I want to have ♾️ cats instead of just 2 😹
| "Either `decoder_input_ids` or `labels` should be passed when calling `forward` with" | ||
| " `BlipForQuestionAnswering`. if you are training the model make sure that `labels` is passed, if you" | ||
| " are using the model for inference make sure that `decoder_input_ids` is passed." | ||
| " are using the model for inference make sure that `decoder_input_ids` is passed or call `generate`" |
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.
No for the change in this PR, but if you are training should be If you are training. And the second part should be , and if you ... or . If you ...
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.
Let @NielsRogge for a second eye 👀 on this PR.
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.
Yes agree here!
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
NielsRogge
left a comment
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!
What does this PR do?
This PR fixes
BLIPdoctest.Link to failing job: https://github.com/huggingface/transformers/actions/runs/3964164193
The docstring of the
forwardmethod ofBlipForQuestionAnsweringhas been corrected to educate users on how to correctly use this module after #21021 being merged.The logic now of the
forwardmethod is pretty much similar toT5.cc @ydshieh 💯