mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Use raw string for regex in tokenization_t5_fast.py (#21125)
Suppress deprecation warning
This commit is contained in:
parent
056218dab1
commit
15adc24208
@ -237,7 +237,7 @@ class T5TokenizerFast(PreTrainedTokenizerFast):
|
||||
|
||||
def get_sentinel_tokens(self):
|
||||
return list(
|
||||
set(filter(lambda x: bool(re.search("<extra_id_\d+>", x)) is not None, self.additional_special_tokens))
|
||||
set(filter(lambda x: bool(re.search(r"<extra_id_\d+>", x)) is not None, self.additional_special_tokens))
|
||||
)
|
||||
|
||||
def get_sentinel_token_ids(self):
|
||||
|
Loading…
Reference in New Issue
Block a user