mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-30 19:47:49 +01:00
comment out split GPU code, and add cleanup code
This commit is contained in:
@@ -1522,12 +1522,11 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"if physical_gpus:\n",
|
"#tf.config.set_logical_device_configuration(\n",
|
||||||
" tf.config.set_logical_device_configuration(\n",
|
"# physical_gpus[0],\n",
|
||||||
" physical_gpus[0],\n",
|
"# [tf.config.LogicalDeviceConfiguration(memory_limit=2048),\n",
|
||||||
" [tf.config.LogicalDeviceConfiguration(memory_limit=2048),\n",
|
"# tf.config.LogicalDeviceConfiguration(memory_limit=2048)]\n",
|
||||||
" tf.config.LogicalDeviceConfiguration(memory_limit=2048)]\n",
|
"#)"
|
||||||
" )"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1539,8 +1538,7 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"[LogicalDevice(name='/device:GPU:0', device_type='GPU'),\n",
|
"[LogicalDevice(name='/device:GPU:0', device_type='GPU')]\n"
|
||||||
" LogicalDevice(name='/device:GPU:1', device_type='GPU')]\n"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -2075,8 +2073,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"import tensorflow as tf\n",
|
|
||||||
"\n",
|
|
||||||
"resolver = tf.distribute.cluster_resolver.TFConfigClusterResolver()\n",
|
"resolver = tf.distribute.cluster_resolver.TFConfigClusterResolver()\n",
|
||||||
"resolver.cluster_spec()"
|
"resolver.cluster_spec()"
|
||||||
]
|
]
|
||||||
@@ -2422,6 +2418,26 @@
|
|||||||
")"
|
")"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Let's clean up:"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"mnist_model2.delete()\n",
|
||||||
|
"custom_training_job.delete()\n",
|
||||||
|
"blobs = bucket.list_blobs(prefix=f\"gs://{bucket_name}/staging/\")\n",
|
||||||
|
"for blob in blobs:\n",
|
||||||
|
" blob.delete()"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
@@ -2612,6 +2628,26 @@
|
|||||||
")"
|
")"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Let's clean up:"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"mnist_model3.delete()\n",
|
||||||
|
"hp_search_job.delete()\n",
|
||||||
|
"blobs = bucket.list_blobs(prefix=f\"gs://{bucket_name}/staging/\")\n",
|
||||||
|
"for blob in blobs:\n",
|
||||||
|
" blob.delete()"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
|
|||||||
Reference in New Issue
Block a user