Skip to content

Commit

Permalink
fix: use the model_id in bento (#5087)
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <me@frostming.com>
  • Loading branch information
frostming authored Nov 15, 2024
1 parent 22bbb36 commit f27377e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/_bentoml_sdk/service/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,10 @@ def on_load_bento(self, bento: Bento) -> None:
# Replace the model version with the one in the Bento
if not isinstance(model, HuggingFaceModel):
continue
model_id = info.metadata.get("model_id") # use the case in bento info
if not model_id:
model_id = info.tag.name.replace("--", "/")
model.model_id = model_id
model.revision = info.tag.version
self.bento = bento

Expand Down

0 comments on commit f27377e

Please sign in to comment.