Skip to content

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
Contributor

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

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