Compare commits

..
Author SHA1 Message Date
Andrew Ferlitsch c0c2583f2d debug: timeout fix 2022-12-17 17:56:04 +00:00
Andrew Ferlitsch e83a341a00 fix: timeout issue for notebook test 2022-12-17 02:09:38 +00:00
3 changed files with 78 additions and 11 deletions
@@ -245,7 +245,7 @@ def process_and_execute_notebook(
result.logs_bucket = operation_metadata.build.logs_bucket
# Block and wait for the result
operation_result = operation.result()
operation_result = operation.result(timeout=86400)
result.duration = datetime.datetime.now() - time_start
result.is_pass = True
@@ -29,7 +29,7 @@
"id": "l2mMvIUG9meX"
},
"source": [
"# Profile model training performance using Vertex AI TensorBoard Profiler\n",
"# Profile model training performance using Profiler\n",
"\n",
"<table align=\"left\">\n",
"\n",
@@ -49,7 +49,7 @@
" <img src=\"https://lh3.googleusercontent.com/UiNooY4LUgW_oTvpsNhPpQzsstV5W8F7rYgxgGBD85cWJoLmrOzhVs_ksK_vgx40SHs7jCqkTkCk=e14-rj-sc0xffffff-h130-w32\" alt=\"Vertex AI logo\">\n",
" Open in Vertex AI Workbench\n",
" </a>\n",
" </td>\n",
" </td> \n",
"</table>"
]
},
@@ -331,16 +331,22 @@
"! gcloud projects add-iam-policy-binding $PROJECT_ID \\\n",
" --member=\"serviceAccount:$SERVICE_ACCOUNT\" \\\n",
" --role=\"roles/storage.admin\" \\\n",
" --quiet\n",
"\n",
" --quiet"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "S_8_5jm-Gk6w"
},
"outputs": [],
"source": [
"# Grant AI Platform permission.\n",
"! gcloud projects add-iam-policy-binding $PROJECT_ID \\\n",
" --member=\"serviceAccount:$SERVICE_ACCOUNT\" \\\n",
" --role=\"roles/aiplatform.user\" \\\n",
" --quiet\n",
"\n",
"! gcloud projects get-iam-policy $PROJECT_ID \\\n",
" --filter=bindings.members:serviceAccount:$SERVICE_ACCOUNT"
" --quiet"
]
},
{
@@ -762,7 +768,7 @@
"WORKDIR /root\n",
"\n",
"# Installs additional packages as you need.\n",
"RUN pip3 install google-cloud-aiplatform[cloud_profiler]>=1.19.1\n",
"RUN pip3 install google-cloud-aiplatform[cloud_profiler]\n",
"\n",
"# Copies the trainer code to the docker image.\n",
"RUN mkdir /root/trainer\n",
@@ -792,7 +798,7 @@
"IMAGE_NAME = \"tensorboard-custom-container\"\n",
"IMAGE_URI = f\"{REGION}-docker.pkg.dev/{PROJECT_ID}/{DOCKER_REPOSITORY}/{IMAGE_NAME}\"\n",
"\n",
"! gcloud builds submit --project {PROJECT_ID} --region={REGION} --tag {IMAGE_URI} --timeout=3600s --quiet"
"! gcloud builds submit --project {PROJECT_ID} --region={REGION} --tag {IMAGE_URI} --timeout=60m --quiet"
]
},
{
+61
View File
@@ -0,0 +1,61 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "346219a0-c421-4986-89c0-1cab5f9896bc",
"metadata": {},
"outputs": [],
"source": [
"import time"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fdeaadd2-900d-4580-a637-b0ec3c892ce7",
"metadata": {},
"outputs": [],
"source": [
"time.sleep(5 * 60)\n",
"print(\"5 mins\")\n",
"\n",
"time.sleep(5 * 60)\n",
"print(\"10 mins\")\n",
"\n",
"time.sleep(5 * 60)\n",
"print(\"15 mins\")\n",
"\n",
"time.sleep(5 * 60)\n",
"print(\"20 mins\")"
]
}
],
"metadata": {
"environment": {
"kernel": "python3",
"name": "common-cpu.m95",
"type": "gcloud",
"uri": "gcr.io/deeplearning-platform-release/base-cpu:m95"
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}