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: better warnings with pipelines #23128

Merged
merged 3 commits into from
May 3, 2023

Conversation

gante
Copy link
Member

@gante gante commented May 3, 2023

What does this PR do?

Addresses comments in #23054

This PR adds the following enhancements to generate-related pipeline warnings:

  1. Clarifies the max_length reduction suggestion in the summarization pipeline
  2. Also pipes task-specific configuration to generation_config (when applicable), which fixes the warning about relying on model.config to parameterize generate

@gante gante requested review from Narsil and sgugger May 3, 2023 12:26
Copy link
Contributor

@Narsil Narsil left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you for this !

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented May 3, 2023

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

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 the fix!

src/transformers/pipelines/text2text_generation.py Outdated Show resolved Hide resolved
@gante gante merged commit 3a08dc6 into huggingface:main May 3, 2023
@gante gante deleted the pipeline_warnings branch May 3, 2023 13:43
qywu pushed a commit to qywu/transformers that referenced this pull request May 3, 2023
gojiteji pushed a commit to gojiteji/transformers that referenced this pull request Jun 5, 2023
novice03 pushed a commit to novice03/transformers that referenced this pull request Jun 23, 2023
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.

4 participants