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

Docs: add missing StoppingCriteria autodocs #30617

Merged
merged 2 commits into from
May 2, 2024

Conversation

gante
Copy link
Member

@gante gante commented May 2, 2024

What does this PR do?

They were not in the main __init__, so make fixup didn't complain :)

cc @zucchini-nlp @Rocketknight1

@gante gante requested a review from amyeroberts May 2, 2024 13:08
Copy link
Collaborator

@amyeroberts amyeroberts 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 adding!

@@ -98,7 +98,7 @@ class MaxNewTokensCriteria(StoppingCriteria):

def __init__(self, start_length: int, max_new_tokens: int):
warnings.warn(
"The class `MaxNewTokensCriteria` is deprecated. "
"The class `MaxNewTokensCriteria` is deprecated and will be removed in v4.42. "
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit - this will be in the 4.41 release and we normally deprecate in 2 release cycles

Suggested change
"The class `MaxNewTokensCriteria` is deprecated and will be removed in v4.42. "
"The class `MaxNewTokensCriteria` is deprecated and will be removed in v4.43. "

Copy link
Member Author

Choose a reason for hiding this comment

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

Added :)

My intuition for the new version + 1 was due to how old this one was: it was deprecated 3 years ago

@HuggingFaceDocBuilderDev

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.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
@gante gante merged commit 66abe13 into huggingface:main May 2, 2024
20 checks passed
@gante gante deleted the docs_stopping_criteria branch May 2, 2024 14:20
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.

None yet

3 participants