Unverified Commit 15adc242 authored by Yusuke Oda's avatar Yusuke Oda Committed by GitHub
Browse files

Use raw string for regex in tokenization_t5_fast.py (#21125)

Suppress deprecation warning
parent 056218da
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment