mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-01-23 15:01:32 -05:00
fix(exception): handle notfound explicitly
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
@@ -630,7 +630,7 @@ class LLM(LLMInterface, t.Generic[_M, _T], metaclass=LLMMetaclass):
|
||||
tag, kwds = self.make_tag(return_unused_kwargs=True, trust_remote_code=trust_remote_code, **self._llm_attrs)
|
||||
try:
|
||||
return bentoml.transformers.get(tag)
|
||||
except bentoml.exceptions.BentoMLException:
|
||||
except bentoml.exceptions.NotFound:
|
||||
logger.info("'%s' with tag (%s) not found, importing from HuggingFace Hub.", self.__class__.__name__, tag)
|
||||
tokenizer_kwds = {k[len("_tokenizer_") :]: v for k, v in kwds.items() if k.startswith("_tokenizer_")}
|
||||
kwds = {k: v for k, v in kwds.items() if not k.startswith("_tokenizer_")}
|
||||
|
||||
Reference in New Issue
Block a user