A model deployment can be deleted using a
When a model deployment is deleted, it deletes the load balancer instances associated with it. However, it doesn’t delete other resources like log group, log, or model.
ModelDeployer instance has a
.delete() method for deleting a model deployment
when give its OCID.
from ads.model.deployment import ModelDeployer deployer = ModelDeployer() deployer.delete(model_deployment_id=deployment_id)
If you have a
ModelDeployment object, you can use the
to delete the model that is associated with that object. The
wait_for_completion parameter accepts a Boolean and
determines if the process is blocking or not.
In the following code snippets, the variable
deployment is a
This object can be obtained from a call to
deployment = deployment.delete(wait_for_completion=True)