Hi, is there a native possibility to retrieve only...
# ask-for-help
a
Hi, is there a native possibility to retrieve only the latest models from bentoml.models.list()?
j
Do you mean retrieving the data with a pagination?
a
@Jian Shen Yap no, if i have a model named "a" with 3 versions, bentoml.models.list will return 3 versions, instead of only the latest. if i could ask for only latest version of my models it would be great
s
To get the latest bento:
bentoml get my_service:latest
To export the latest bento:
bentoml export my_service:latest your_path/my_bento.tar.gz
a
i mean a list of all latest bentoml models
for one model its clear
s
bentoml interacts with
bentos
and not with specific models. one possible solution is to make your model tags contain the bento tags. So, when you do
bentoml list
, you know which model you are looking at. see
bentoml -h
.