This message was deleted.
# ask-for-help
s
This message was deleted.
j
hey @Jaydeep Samanta, I'm not sure if I fully understood your question. Do you mind elaborating it more?
j
Sure, I have created a bento for my project which has some trained, but there also models in the bentoml local store which were created outside of the bento, so I wanted to access models inside of that bento and not from bentoml local store, hope I was able to explain that.
j
when you do
save_model
you should obtain a
tag
where you are able to get the model with the
tag
with
load_model
. Does this sounds like a solution to you?
j
I was able to get it using
bentoml.models.list()
but is there any way to differentiate from bento's model store and the bentoml's local mdoel store?
is there a way to check from bentoml cli on terminal as well?
Just for the context, I would like to access a list of all the trained models inside the bento, and would like to delete the oldest model. For instance, if there are 10 models, I would want to keep 9 and delete the 10th model and train a new one, this is for a continuous learning model.
j
okay, so you mean, you have a bento A that uses models X, Y, Z, and you want to be able to grep these 3 models and all its related versions with respect to bento A?
bentoml get <bento-tag>
would output the information of the bento and the model that is used by it
something like
Copy code
service: service:svc
name: sentence-embedding-svc
version: 0.5.0
bentoml_version: 1.1.1
creation_time: '2023-08-11T01:08:37.913573+00:00'
labels:
  support_gpu: 'False'
models:
- tag: all-minilm-l6-v2:few7kkrx3k3uxuqj
  module: bentoml.transformers
  creation_time: '2023-08-11T00:01:02.834436+00:00'
- tag: all-minilm-l6-v2-tokenizer:fggc4obx3k3uxuqj
  module: bentoml.transformers
  creation_time: '2023-08-11T00:01:03.452978+00:00'
runners:
- name: sentence_embedding_model
  runnable_type: SentenceEmbeddingRunnable
  embedded: false
  models: []
  resource_config: null
apis:
- name: encode
  input_type: JSON
  output_type: NumpyNdarray
docker:
  distro: debian
  python_version: '3.10'
  cuda_version: null
  env: null
  system_packages: null
  setup_script: null
  base_image: null
  dockerfile_template: null
python:
  requirements_txt: ./requirements.txt
  packages: null
  lock_packages: null
  index_url: null
  no_index: null
  trusted_host: null
  find_links: null
  extra_index_url: null
  pip_args: null
  wheels: null
conda:
  environment_yml: null
  channels: null
  dependencies: null
  pip: null
does this helps?
j
yes to some extent but in my case, I have more than 1 model files
this won't since I have more than 1 models inside
j
as you can see in the yaml file above, it will show all the models that is being used by the bento
j
I currently see only 1 tag
Copy code
"models": [
    {
      "tag": "cpu_utilization_model:2xjpddsa3cmvtury",
      "module": "bentoml.mlflow",
      "creation_time": "2023-08-22T10:44:13.955418+00:00"
    }
  ],
I am using "bentoml_version": "1.0.20"