Unverified Commit d9836d45 authored by Cyrus Leung's avatar Cyrus Leung Committed by GitHub
Browse files

[Deprecation] Deprecate `LLM.set_tokenizer` (#26333)


Signed-off-by: default avatarDarkLight1337 <tlleungac@connect.ust.hk>
parent 5f7e8a91
...@@ -9,7 +9,7 @@ import cloudpickle ...@@ -9,7 +9,7 @@ import cloudpickle
import torch.nn as nn import torch.nn as nn
from pydantic import ValidationError from pydantic import ValidationError
from tqdm.auto import tqdm from tqdm.auto import tqdm
from typing_extensions import TypeVar from typing_extensions import TypeVar, deprecated
from vllm.beam_search import ( from vllm.beam_search import (
BeamSearchInstance, BeamSearchInstance,
...@@ -354,6 +354,7 @@ class LLM: ...@@ -354,6 +354,7 @@ class LLM:
def get_tokenizer(self) -> AnyTokenizer: def get_tokenizer(self) -> AnyTokenizer:
return self.llm_engine.get_tokenizer() return self.llm_engine.get_tokenizer()
@deprecated("`set_tokenizer` is deprecated and will be removed in v0.13.")
def set_tokenizer(self, tokenizer: AnyTokenizer) -> None: def set_tokenizer(self, tokenizer: AnyTokenizer) -> None:
# While CachedTokenizer is dynamic, have no choice but # While CachedTokenizer is dynamic, have no choice but
# compare class name. Misjudgment will arise from # compare class name. Misjudgment will arise from
......
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