bentoml / BentoML

The easiest way to serve AI apps and models - Build Model Inference APIs, Job queues, LLM apps, Multi-model pipelines, and more!
https://bentoml.com
Apache License 2.0
7.17k stars 792 forks source link

Cannot delete BentoML model in Yatai service #1606

Closed mar-muel closed 3 years ago

mar-muel commented 3 years ago

My model name is

test-model:1.0.20210507102237_9234C9

which means I've used bentoml.ver(major=1, minor=0) and

@property
def name(self):
     return "test-model"

in the service class.

When trying to delete this model with

bentoml delete test-model:1.0.20210507102237_9234C9

I get the following error:

Error: Invalid value for '[DELETE_TARGETS]': Bad formatting. Please present a valid bento bundle name or "name:version" tag. For list of bento bundles, separate delete targets by ",", for example: "my_service:v1,my_service:v2,classifier"
yubozhao commented 3 years ago

@mar-muel Thank you for filing this issue. Can you share with me what BentoML version you are using? and other system info such as python version?

parano commented 3 years ago

hi @mar-muel - overriding the name property is not expected to work, currently BentoML only supports using the class name as the Bento name

mar-muel commented 3 years ago

Ok - thanks @parano.

The idea here was to be consistent between Bento service names and docker image names which are usually required to be snake case.

If this is not a feature you are willing to support in the future, I will close this issue.

parano commented 3 years ago

@mar-muel it sounds like it's just a preference on naming, not a blocker for you? if that's the case, we probably won't provide this support because it will require lots of changes on BentoML side