Skip to content

Commit

Permalink
Remove unnecessary code to avoid repeated warning
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkLight1337 committed May 26, 2024
1 parent 7b8ce2c commit fff21a1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions vllm/engine/llm_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ def __init__(
self.tokenizer = None
self.detokenizer = None

self._eos_warn_count = 0

self.seq_counter = Counter()
self.generation_config_fields = _load_generation_config_dict(
model_config)
Expand Down Expand Up @@ -419,11 +417,8 @@ def _verify_args(self) -> None:
def _get_eos_token_id(
self, lora_request: Optional[LoRARequest]) -> Optional[int]:
if self.tokenizer is None:
if self._eos_warn_count == 0:
logger.warning("Using None for EOS token id because tokenizer "
"is not initialized")

self._eos_warn_count += 1
logger.warning("Using None for EOS token id because tokenizer "
"is not initialized")
return None

return self.tokenizer.get_lora_tokenizer(lora_request).eos_token_id
Expand Down

0 comments on commit fff21a1

Please sign in to comment.