Skip to content
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

Fixed the docstring and type hint for forced_decoder_ids option in Ge… #19640

Merged
merged 2 commits into from
Oct 17, 2022
Merged

Fixed the docstring and type hint for forced_decoder_ids option in Ge… #19640

merged 2 commits into from
Oct 17, 2022

Conversation

koreyou
Copy link
Contributor

@koreyou koreyou commented Oct 15, 2022

What does this PR do?

This PR fixes #19602 where the docstring and type hint for forced_decoder_ids option in GenerationMixin.generate were inconsistent with the actual implementation.

Fixes #19602

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@gante has suggested me to send a PR for the issue #19602.

…nerationMixin.generate to be consistent with the actual implementation
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 15, 2022

The documentation is not available anymore as the PR was closed or merged.

@gante gante requested review from gante and sgugger October 17, 2022 08:43
Copy link
Member

@gante gante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general LGTM -- left a comment about the conciseness of the new docstring. And thank you for also fixing on the TF side 🙌

src/transformers/generation_tf_utils.py Outdated Show resolved Hide resolved
src/transformers/generation_tf_utils.py Outdated Show resolved Hide resolved
src/transformers/generation_utils.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the documentation better!

@koreyou
Copy link
Contributor Author

koreyou commented Oct 17, 2022

@gante Thanks for the comment! I've taken in your suggestion in the new commit. Please proceed with the merge if it is looking good.

@gante
Copy link
Member

gante commented Oct 17, 2022

@koreyou Awesome, thank you for the changes! I will merge as soon as CI turns to green :)

@gante gante merged commit 82e360b into huggingface:main Oct 17, 2022
kashif pushed a commit to kashif/transformers that referenced this pull request Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation and implementation are inconsistent for forced_decoder_ids option in GenerationMixin.generate
4 participants