09-27-2024 07:57 AM
Hi all,
I have a registered model deployed via DAB as part of our MLOps architecture. I'm looking to deploy this model, along with other resources (workflows, schemas, experiments, etc.), in our development environment, allowing team members to easily test and experiment with different approaches.
In our setup, development environment resources are deployed with a prefix that depends on the branch name. This allows multiple users to work on different branches simultaneously, with each branch deploying its own set of resources. When a branch is ready for merge, I run `databricks bundle destroy --target dev` to clean up the associated resources for that specific branch.
This works well, except when the registered model in the dev environment contains a model version. In such cases, I encounter the following error:
`Error: cannot delete registered model: Function model_name_here is not empty. The function has 1 model version(s).`
Is there a way to overcome this limitation and delete the registered model with its version(s) in the dev environment?
Thanks for your help!
10-15-2024 12:25 AM
Following here
10-21-2024 02:48 PM
I have also run into this issue. You can delete the model programmatically in a notebook (client.delete_registered_model(name=model_name)) and then run the desired bundle command, but I would also really like a DAB native solution to this.
10-22-2024 12:39 AM
Definitely! It would be great if the 'databricks bundle destroy' command had a flag that allowed you to remove registered models as well
I agree with you; the only solution I've found at the moment is to define a custom script for destroying the bundle, which first removes all model versions through the Mlflow Python API and then runs 'databricks bundle destroy'.
11-14-2024 03:45 AM
@Tapestry2508 please share your script for full bundle destroy. Maybe a github gist?
Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!
Sign Up Now