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

Fix two tiny typos in pipelines/base.py::Pipeline::_sanitize_parameters()'s docstring #29102

Merged
merged 2 commits into from
Feb 19, 2024

Conversation

sadra-barikbin
Copy link
Contributor

Hi there!
To fix two tiny typos in pipelines/base.py::Pipeline::_sanitize_parameters()'s docstring.

@Narsil

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 fixing!

@sadra-barikbin
Copy link
Contributor Author

One more thing. We have False for default value of clean_up_tokenization_spaces argument in TextGenerationPipeline's docstring:

clean_up_tokenization_spaces (`bool`, *optional*, defaults to `False`):
Whether or not to clean up the potential extra spaces in the text output.

but its default value in TextGenerationPipeline::postprocess is True:

def postprocess(self, model_outputs, return_type=ReturnType.FULL_TEXT, clean_up_tokenization_spaces=True):

@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.

@amyeroberts
Copy link
Collaborator

@sadra-barikbin Good spot! Could you add a fix for the docstring in this PR too?

@sadra-barikbin
Copy link
Contributor Author

sadra-barikbin commented Feb 19, 2024

The pipelines in text2text_generation.py class have clean_up_tokenization_spaces=False as default. This has been the desired behavior?

@amyeroberts
Copy link
Collaborator

@sadra-barikbin Yes, I believe so. Changing the default behaviour would be a breaking change, so we should keep as-is

@amyeroberts amyeroberts merged commit a4851d9 into huggingface:main Feb 19, 2024
2 checks passed
itazap pushed a commit that referenced this pull request May 14, 2024
…ers()`'s docstring (#29102)

* Update base.py

* Fix a typo
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