diff --git a/notebooks/notebook_template.ipynb b/notebooks/notebook_template.ipynb index 13e0866af..2c0a46b01 100644 --- a/notebooks/notebook_template.ipynb +++ b/notebooks/notebook_template.ipynb @@ -675,9 +675,6 @@ }, "outputs": [], "source": [ - "# Warning: Setting this to true will delete everything in your bucket\n", - "delete_bucket = False\n", - "\n", "# Delete endpoint resource\n", "! gcloud ai endpoints delete $ENDPOINT_NAME --quiet --region $REGION_NAME\n", "\n", @@ -687,7 +684,7 @@ "# Delete Cloud Storage objects that were created\n", "! gsutil -m rm -r $JOB_DIR\n", "\n", - "if delete_bucket and \"BUCKET_URI\" in globals():\n", + "if os.getenv(\"IS_TESTING\"):\n", " ! gsutil -m rm -r $BUCKET_URI" ] }