Unverified Commit ebf6ef1a authored by Zhuohan Li's avatar Zhuohan Li Committed by GitHub
Browse files

[Minor] Change warning->warning_once in preprocess (#26455)


Signed-off-by: default avatarZhuohan Li <zhuohan123@gmail.com>
parent 0c52d6ef
...@@ -69,7 +69,7 @@ class InputPreprocessor: ...@@ -69,7 +69,7 @@ class InputPreprocessor:
def get_bos_token_id(self) -> Optional[int]: def get_bos_token_id(self) -> Optional[int]:
if self.tokenizer is None: if self.tokenizer is None:
logger.warning( logger.warning_once(
"Using None for BOS token id because tokenizer is not initialized" "Using None for BOS token id because tokenizer is not initialized"
) )
return None return None
...@@ -78,7 +78,7 @@ class InputPreprocessor: ...@@ -78,7 +78,7 @@ class InputPreprocessor:
def get_eos_token_id(self) -> Optional[int]: def get_eos_token_id(self) -> Optional[int]:
if self.tokenizer is None: if self.tokenizer is None:
logger.warning( logger.warning_once(
"Using None for EOS token id because tokenizer is not initialized" "Using None for EOS token id because tokenizer is not initialized"
) )
return None return None
......
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