When you do a `bentoml containerize pytorch_mnist_...
# ask-for-help
r
When you do a
bentoml containerize pytorch_mnist_demo:latest
, for example, how does BentoML know which model from the
~/bentoml/models
directory to copy into the container? For example, suppose the following models exist, how does
bentoml containerize pytorch_mnist_demo:latest
know to use the
pytorch_mnist
model, and how does it know which version to use, since in this example, there are two versions of the
pytorch_mnist
model?
Copy code
$ bentoml models list
 Tag                             Module           Size      Creation Time       
 iris_clf:yrgcaphel2f4tlg6       bentoml.sklearn  5.98 KiB  2024-03-17 09:03:36 
 pytorch_mnist:7sm2kgxekkguplg6  bentoml.pytorch  1.30 MiB  2024-03-17 07:39:17 
 pytorch_mnist:aq7jcehd66tj3lg6  bentoml.pytorch  1.30 MiB  2024-03-16 20:40:56
j
it takes latest created ones based on the timestamp
r
Thank you, Jian. So it's strictly based on the timestamp and not what's contained in the
latest
file, correct?
Copy code
$ cat ~/bentoml/models/pytorch_mnist/latest
7sm2kgxekkguplg6
Also, is that configurable? That is, can you specify a specific model to use in the
bentoml containerize
command? Just trying to understand how things work. Thanks.
j
if you want to specify a model you should use the
tag
!
r
Thank you.