This message was deleted.
# ask-for-help
s
This message was deleted.
e
I'm curious about this too. I know by default,
bentoml.<framework.save_model()
saves the model artifact at
$HOME/bentoml/models
. But what if you're training in a cloud environment. Would you need to manually zip up that model artifact and save it somewhere? Or is there a cleaner integration with MLFlow/Bento registry?
👍 1
s
Hope someone from support will give an answer!
e
I see this example where both
bento...save_model
and
mlflow.log_model
are shown. https://github.com/bentoml/BentoML/blob/main/examples/mlflow/pytorch/mnist.py#L212-L250
s
Thanks for sharing..but question remains same!
BentoML is saving pytorch model but where it will get stored in Cloud Environment like Azure DataBricks?
e
Yeah, presumably you could use Databricks' managed MLFlow feature. I'm not sure how you'd start with that. Then you'd log models to MLFlow and import them using bento. I'd like to see a guide on that. We've set up a local MLFlow instance at BENlabs, but we have yet start using it as a model registry, let alone with Bento. That's coming up for us probably in a month or two
s
But what if my job starts after i am getting model instance or pkl file..how would i convert it into bentos and store on DB?
e
If you've already got a pickle file, I believe you can load it into memory with something like
Copy code
model = joblib.load(...)
bentoml.sklearn.save_model(model)

or 

mlflow.log_model(model)
(for example)
j
Hi all. If I understand your question correctly, you may want
bentoml models export
subcommand.
Copy code
➜ bentoml models list
 Tag                                        Module                   Size        Creation Time
 iris_clf:ihiyxpvbbw2iqusu                  bentoml.sklearn          5.99 KiB    2023-01-31 10:16:22
➜ bentoml models export iris_clf:ihiyxpvbbw2iqusu
Model(tag="iris_clf:ihiyxpvbbw2iqusu") exported to /home/agent/BentoML2/iris_clf-ihiyxpvbbw2iqusu.bentomodel.
s
Hey Jiang...The context of the question is that what if I want to use bentoml on Databricks.I would want to build bento on Databricks itself.So where would my bentos will be saved ?
Because when i build bento on my local system it gets saved in home directory of my local system.
j
You can export bentos as well
s
Then it would be like doing development on local system and then exporting it to ADB.What if i want to do end to end process of model deployment on Databricks itself.Because hardly one develops and deploys model on local system.!
j
just "bentoml list" then "bentoml export"
s
But where are we building bentos?on local or ADB?
j
you can build on ADB
s
ok
j
and export it to anywhere you want
s
Do you have any documentation for running bentos as docker image on ADB!
j
containerizing a bento is simple with bentoml cli.
bentoml containerize
This command will build a docker image from a bento with local docker
s
ok..let me come back on this after developing bento and containerizing it on databricks itself.
j
But I wonder if there is docker installed in ADB
s
let me check and comeback on this.I thank you for your replies.
🍻 1
j
nvm