From f38c2b9fe2a52ed67bf4c1682aa8ef32bb2ecf86 Mon Sep 17 00:00:00 2001 From: Sheri Gilley Date: Wed, 25 Jan 2023 17:16:44 -0600 Subject: [PATCH 1/4] fix code cell If creating the compute cluster, the print didn't work. This change fixes that. (Default code won't hit this, because the compute cluster already exists. But only occurs when that default cluster is not present.) --- tutorials/azureml-in-a-day/azureml-in-a-day.ipynb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb b/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb index 89cb5e549a..d6ff9a4f78 100644 --- a/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb +++ b/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb @@ -162,7 +162,7 @@ " print(\"Creating a new cpu compute target...\")\n", "\n", " # Let's create the Azure ML compute object with the intended parameters\n", - " cpu_cluster = AmlCompute(\n", + " cpu_cluster_config = AmlCompute(\n", " name=cpu_compute_target,\n", " # Azure ML Compute is the on-demand VM service\n", " type=\"amlcompute\",\n", @@ -173,16 +173,16 @@ " # Nodes in cluster\n", " max_instances=4,\n", " # How many seconds will the node running after the job termination\n", - " idle_time_before_scale_down=180,\n", + " idle_time_before_scale_down=180,\,\n", " # Dedicated or LowPriority. The latter is cheaper but there is a chance of job termination\n", - " tier=\"Dedicated\",\n", + " tier=\"Dedicated\"n", " )\n", "\n", " # Now, we pass the object to MLClient's create_or_update method\n", - " cpu_cluster = ml_client.compute.begin_create_or_update(cpu_cluster)\n", + " cpu_cluster = ml_client.compute.begin_create_or_update(cpu_cluster_config)\n", "\n", "print(\n", - " f\"AMLCompute with name {cpu_cluster.name} is created, the compute size is {cpu_cluster.size}\"\n", + " f\"AMLCompute with name {cpu_cluster_config.name} is created, the compute size is {cpu_cluster_config.size}\"\n", ")" ] }, From 50e5696b6d26f413b71cb7b3c69ea746b1ca9b1e Mon Sep 17 00:00:00 2001 From: Sheri Gilley Date: Thu, 26 Jan 2023 10:00:54 -0600 Subject: [PATCH 2/4] Update azureml-in-a-day.ipynb --- tutorials/azureml-in-a-day/azureml-in-a-day.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb b/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb index d6ff9a4f78..31acc1cd99 100644 --- a/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb +++ b/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb @@ -173,9 +173,9 @@ " # Nodes in cluster\n", " max_instances=4,\n", " # How many seconds will the node running after the job termination\n", - " idle_time_before_scale_down=180,\,\n", + " idle_time_before_scale_down=180,\n", " # Dedicated or LowPriority. The latter is cheaper but there is a chance of job termination\n", - " tier=\"Dedicated\"n", + " tier=\"Dedicated\",\n", " )\n", "\n", " # Now, we pass the object to MLClient's create_or_update method\n", From adec7ffbbba3cbc6d260baed7d479b48a2dd7289 Mon Sep 17 00:00:00 2001 From: Sheri Gilley Date: Tue, 31 Jan 2023 14:53:27 -0600 Subject: [PATCH 3/4] Update azureml-in-a-day.ipynb --- tutorials/azureml-in-a-day/azureml-in-a-day.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb b/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb index 31acc1cd99..c341b4dcf2 100644 --- a/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb +++ b/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb @@ -181,9 +181,9 @@ " # Now, we pass the object to MLClient's create_or_update method\n", " cpu_cluster = ml_client.compute.begin_create_or_update(cpu_cluster_config)\n", "\n", - "print(\n", - " f\"AMLCompute with name {cpu_cluster_config.name} is created, the compute size is {cpu_cluster_config.size}\"\n", - ")" + " print(\n", + " f\"AMLCompute with name {cpu_cluster_config.name} is created, the compute size is {cpu_cluster_config.size}\"\n", + " )" ] }, { From adc564b1ef7d5fdd5dc4aa799df5da23265749e7 Mon Sep 17 00:00:00 2001 From: Sheri Gilley Date: Thu, 2 Feb 2023 10:17:00 -0600 Subject: [PATCH 4/4] move print and revert var change --- tutorials/azureml-in-a-day/azureml-in-a-day.ipynb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb b/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb index c341b4dcf2..541751e39e 100644 --- a/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb +++ b/tutorials/azureml-in-a-day/azureml-in-a-day.ipynb @@ -162,7 +162,7 @@ " print(\"Creating a new cpu compute target...\")\n", "\n", " # Let's create the Azure ML compute object with the intended parameters\n", - " cpu_cluster_config = AmlCompute(\n", + " cpu_cluster = AmlCompute(\n", " name=cpu_compute_target,\n", " # Azure ML Compute is the on-demand VM service\n", " type=\"amlcompute\",\n", @@ -177,13 +177,14 @@ " # Dedicated or LowPriority. The latter is cheaper but there is a chance of job termination\n", " tier=\"Dedicated\",\n", " )\n", + + " print(\n", + " f\"AMLCompute with name {cpu_cluster.name} will be created, with compute size {cpu_cluster.size}\"\n", + " )", "\n", " # Now, we pass the object to MLClient's create_or_update method\n", - " cpu_cluster = ml_client.compute.begin_create_or_update(cpu_cluster_config)\n", - "\n", - " print(\n", - " f\"AMLCompute with name {cpu_cluster_config.name} is created, the compute size is {cpu_cluster_config.size}\"\n", - " )" + " cpu_cluster = ml_client.compute.begin_create_or_update(cpu_cluster)\n", + "\n" ] }, {