Clean up the Google Cloud resources that you created to train your image classification model and get predictions from it. Follow these steps to avoid incurring unexpected charges from some of the resources.
This tutorial has several pages:
Cleaning up your project.
Each page assumes that you have already performed the instructions from the previous pages of the tutorial.
Delete Vertex AI resources
This section describes how to undeploy your model, and then delete the following project resources: endpoint, model, dataset, and Cloud Storage bucket.
Undeploy your model
Before you can delete your model and endpoint, you must undeploy the model.
In the Google Cloud console, in the Vertex AI section, go to the Training page.
Select your trained AutoML model. This takes you to the Evaluate tab.
Click the Deploy & test tab.
Find your model. On your model's row, click the three vertical dots, then click Undeploy model.
In Undeploy model, click Confirm.
Delete your endpoint
In the Google Cloud console, in the Vertex AI section, go to the Endpoints page.
Find your endpoint,
hello_automl_image. On that row, click the three vertical dots , then click Remove endpoint.
In Remove endpoint, click Confirm.
Delete your model
In the Google Cloud console, in the Vertex AI section, go to the Models page.
Find your model. On that row, click the three vertical dots, then click Delete model.
In Delete model and all of its associated versions, click Delete.
Delete your dataset
In the Google Cloud console, in the Vertex AI section, go to the Datasets page.
Find your dataset. On that row, click the three vertical dots, then click Delete dataset.
In Delete dataset, click Delete.
Clean up your Cloud Shell session
Cloud Shell incurs no charges, and it automatically deletes your home disk after a period of inactivity.
Delete your Cloud Storage bucket
During this tutorial, Vertex AI created a bucket for you that is used to store the imported images. To find this bucket so you you can delete it, in your Cloud Shell session, run the following command.
gsutil ls -L -b
Find the bucket with a name that starts with
cloud-ai-platform in the
US-CENTRAL1 region that was created the day you ran this tutorial. Make a note
of the name of this bucket. It is appended with a GUID, so might look like
cloud-ai-platform-12345678-9123-4567-8910-123456789012. This is the bucket
Vertex AI created for you. Make a note of its full name, then run the
gsutil -m rm -rf gs://BUCKET_NAME
Replace BUCKET_NAME with the name of the Cloud Storage bucket you just made a note of. This command deletes every image you imported into the bucket, then deletes the bucket.
To learn about additional ways to train ML models on Vertex AI, try one of the other Vertex AI tutorials.
Read an overview of how Vertex AI works.