mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-03-05 07:36:15 -05:00
chore: only add bentomodel branch during generated service with
OpenLLM Signed-off-by: aarnphm-ec2-dev <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
@@ -892,10 +892,13 @@ class LLM(LLMInterface[M, T], ReprMixin):
|
||||
'''
|
||||
models = models if models is not None else []
|
||||
|
||||
try:
|
||||
models.append(self._bentomodel)
|
||||
except bentoml.exceptions.NotFound as err:
|
||||
raise RuntimeError(f'Failed to locate {self._bentomodel}:{err}') from None
|
||||
if os.environ.get('BENTO_PATH') is None:
|
||||
# Hmm we should only add this if it is not in the container environment
|
||||
# BentoML sets BENTO_PATH so we can use this as switch logic here.
|
||||
try:
|
||||
models.append(self._bentomodel)
|
||||
except bentoml.exceptions.NotFound as err:
|
||||
raise RuntimeError(f'Failed to locate {self._bentomodel}:{err}') from None
|
||||
|
||||
generate_sig = ModelSignature.from_dict(ModelSignatureDict(batchable=False))
|
||||
embeddings_sig = ModelSignature.from_dict(ModelSignatureDict(batchable=True, batch_dim=0))
|
||||
|
||||
Reference in New Issue
Block a user