remove warning v2 (#33761)

This commit is contained in:
Ita Zaporozhets 2024-09-27 14:54:28 +02:00 committed by GitHub
parent 4196590aa0
commit 0d09c44bd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1613,14 +1613,6 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
self.model_input_names = kwargs.pop("model_input_names", self.model_input_names)
if "clean_up_tokenization_spaces" not in kwargs:
warnings.warn(
"`clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This "
"behavior will be deprecated in transformers v4.45, and will be then set to `False` by default. "
"For more details check this issue: https://github.com/huggingface/transformers/issues/31884",
FutureWarning,
)
# By default, cleaning tokenization spaces for both fast and slow tokenizers
self.clean_up_tokenization_spaces = kwargs.pop("clean_up_tokenization_spaces", False)