Skip to content

Commit

Permalink
remove warning v2 (huggingface#33761)
Browse files Browse the repository at this point in the history
  • Loading branch information
itazap authored and BernardZach committed Dec 5, 2024
1 parent 61b6bdb commit c3c4164
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/transformers/tokenization_utils_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1613,14 +1613,6 @@ def __init__(self, **kwargs):

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)

Expand Down

0 comments on commit c3c4164

Please sign in to comment.