Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker committed May 14, 2024
1 parent 6ed07ac commit 9a65f9f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/transformers/tokenization_utils_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2905,7 +2905,7 @@ def _call_one(
return_offsets_mapping: bool = False,
return_length: bool = False,
verbose: bool = True,
split_special_tokens:bool = False,
split_special_tokens: bool = False,
**kwargs,
) -> BatchEncoding:
# Input type checking for clearer error
Expand Down Expand Up @@ -3094,7 +3094,7 @@ def _encode_plus(
return_offsets_mapping: bool = False,
return_length: bool = False,
verbose: bool = True,
split_special_tokens:bool = False,
split_special_tokens: bool = False,
**kwargs,
) -> BatchEncoding:
raise NotImplementedError
Expand Down Expand Up @@ -3125,7 +3125,7 @@ def batch_encode_plus(
return_offsets_mapping: bool = False,
return_length: bool = False,
verbose: bool = True,
split_special_tokens:bool = False,
split_special_tokens: bool = False,
**kwargs,
) -> BatchEncoding:
"""
Expand Down Expand Up @@ -3170,7 +3170,8 @@ def batch_encode_plus(
return_special_tokens_mask=return_special_tokens_mask,
return_offsets_mapping=return_offsets_mapping,
return_length=return_length,
verbose=verbose,split_special_tokens=split_special_tokens,
verbose=verbose,
split_special_tokens=split_special_tokens,
**kwargs,
)

Expand Down Expand Up @@ -3199,7 +3200,7 @@ def _batch_encode_plus(
return_offsets_mapping: bool = False,
return_length: bool = False,
verbose: bool = True,
split_special_tokens:bool = False,
split_special_tokens: bool = False,
**kwargs,
) -> BatchEncoding:
raise NotImplementedError
Expand Down
4 changes: 2 additions & 2 deletions src/transformers/tokenization_utils_fast.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def _batch_encode_plus(
return_offsets_mapping: bool = False,
return_length: bool = False,
verbose: bool = True,
split_special_tokens:bool = False,
split_special_tokens: bool = False,
) -> BatchEncoding:
if not isinstance(batch_text_or_text_pairs, (tuple, list)):
raise TypeError(
Expand Down Expand Up @@ -574,7 +574,7 @@ def _encode_plus(
return_offsets_mapping: bool = False,
return_length: bool = False,
verbose: bool = True,
split_special_tokens:bool = False,
split_special_tokens: bool = False,
**kwargs,
) -> BatchEncoding:
batched_input = [(text, text_pair)] if text_pair else [text]
Expand Down

0 comments on commit 9a65f9f

Please sign in to comment.