Skip to content

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

Merged
amyeroberts merged 2 commits into
huggingface:mainfrom
sadra-barikbin:patch-4
Feb 19, 2024
Merged

Fix two tiny typos in pipelines/base.py::Pipeline::_sanitize_parameters()'s docstring#29102
amyeroberts merged 2 commits into
huggingface:mainfrom
sadra-barikbin:patch-4

Conversation

@sadra-barikbin

Copy link
Copy Markdown
Contributor

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

@Narsil

@amyeroberts amyeroberts left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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

@sadra-barikbin

sadra-barikbin commented Feb 19, 2024

Copy link
Copy Markdown
Contributor Author

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

@amyeroberts

Copy link
Copy Markdown
Contributor

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