Fixed cleanup code for matching engine index endpoint (#1493)

Co-authored-by: ivanmkc@google.com <ivanmkc@google.com>
This commit is contained in:
Ivan Cheung
2023-01-30 09:52:32 -05:00
committed by GitHub
co-authored by ivanmkc@google.com <ivanmkc@google.com>
parent c180408f41
commit 9a6c36d016
@@ -103,7 +103,6 @@ class EndpointResourceCleanupManager(VertexAIResourceCleanupManager):
models.id for models in resource._gca_resource.deployed_models
]:
resource._undeploy(deployed_model_id=deployed_model_id)
resource.delete(force=True)
@@ -117,3 +116,7 @@ class MatchingEngineIndexResourceCleanupManager(VertexAIResourceCleanupManager):
class MatchingEngineIndexEndpointResourceCleanupManager(VertexAIResourceCleanupManager):
vertex_ai_resource = aiplatform.MatchingEngineIndexEndpoint
def delete(self, resource):
resource.undeploy_all()
resource.delete(force=True)