|
151 | 151 | "from azure.ai.ml.entities import AmlCompute\n",
|
152 | 152 | "\n",
|
153 | 153 | "# Name assigned to the compute cluster\n",
|
154 |
| - "cpu_compute_target = \"cpu-cluster\"\n", |
| 154 | + "cpu_compute_target = \"aml-cluster\"\n", |
155 | 155 | "\n",
|
156 | 156 | "try:\n",
|
157 | 157 | " # let's see if the compute target already exists\n",
|
|
181 | 181 | " )\n",
|
182 | 182 | "\n",
|
183 | 183 | " # Now, we pass the object to MLClient's create_or_update method\n",
|
184 |
| - " cpu_cluster = ml_client.compute.begin_create_or_update(cpu_cluster)\n", |
185 |
| - "\n", |
186 |
| - " print(\n", |
187 |
| - " f\"AMLCompute with name {cpu_cluster.name} is created, the compute size is {cpu_cluster.size}\"\n", |
188 |
| - " )" |
| 184 | + " cpu_cluster = ml_client.compute.begin_create_or_update(cpu_cluster)\n" |
189 | 185 | ]
|
190 | 186 | },
|
191 | 187 | {
|
|
232 | 228 | "from azure.ai.ml.entities import AmlCompute\n",
|
233 | 229 | "\n",
|
234 | 230 | "cluster_scale = AmlCompute(\n",
|
235 |
| - " name=\"cpu-cluster\",\n", |
| 231 | + " name=\"aml-cluster\",\n", |
236 | 232 | " max_instances=2,\n",
|
237 | 233 | ")\n",
|
238 | 234 | "ml_client.begin_create_or_update(cluster_scale)"
|
|
273 | 269 | },
|
274 | 270 | "outputs": [],
|
275 | 271 | "source": [
|
276 |
| - "cpu_cluster = ml_client.compute.get(\"cpu-cluster\")\n", |
| 272 | + "cpu_cluster = ml_client.compute.get(\"aml-cluster\")\n", |
277 | 273 | "\n",
|
278 | 274 | "print (\n",
|
279 | 275 | " f\"AMLCompute with name {cpu_cluster.name} has a maximum of {cpu_cluster.max_instances} nodes\"\n",
|
|
383 | 379 | " code=\"./src\",\n",
|
384 | 380 | " command=\"python diabetes-training.py\",\n",
|
385 | 381 | " environment=\"AzureML-sklearn-0.24-ubuntu18.04-py37-cpu@latest\",\n",
|
386 |
| - " compute=\"cpu-cluster\",\n", |
| 382 | + " compute=\"aml-cluster\",\n", |
387 | 383 | " display_name=\"diabetes-train-cluster\",\n",
|
388 | 384 | " experiment_name=\"diabetes-training\"\n",
|
389 | 385 | " )\n",
|
|
0 commit comments