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

Generate: All logits processors are documented and have examples #27796

Merged
merged 6 commits into from
Dec 7, 2023

Conversation

gante
Copy link
Member

@gante gante commented Dec 1, 2023

What does this PR do?

This PR retouches the docstrings of the logits processors such that:
a) they all have a short description of what they do
b) there is a clear example for each class, ideally showcasing its usefulness (note: this will also means the class is doctested)

Moreover, to ensure this information is found, cross references to these classes were added.

Related issue #24575

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@gante gante force-pushed the logits_processor_docstring branch from b66d782 to b42139a Compare December 5, 2023 16:54
@gante gante requested a review from ArthurZucker December 5, 2023 17:14
@gante gante marked this pull request as ready for review December 5, 2023 17:14
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

LGTM thanks for the cleanup

src/transformers/generation/logits_process.py Outdated Show resolved Hide resolved
src/transformers/generation/logits_process.py Outdated Show resolved Hide resolved
@gante gante merged commit 58e7f9b into huggingface:main Dec 7, 2023
22 checks passed
@gante gante deleted the logits_processor_docstring branch December 7, 2023 15:11
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.

3 participants