Skip to content

Commit

Permalink
compute update and viz error fix (#2454)
Browse files Browse the repository at this point in the history
* compute update and viz error fix

* v1 notebooks compute update

* format updates

* format updates

* format updates

* compute name update

* cluster name update

* cluster update
  • Loading branch information
vadthyavath authored Jul 19, 2023
1 parent df7837c commit bff4840
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@
"from azure.ai.ml.entities import AmlCompute\n",
"from azure.core.exceptions import ResourceNotFoundError\n",
"\n",
"compute_name = \"gpu-cluster-nc6\"\n",
"compute_name = \"gpu-cluster-nc6sv3\"\n",
"\n",
"try:\n",
" _ = ml_client.compute.get(compute_name)\n",
Expand All @@ -458,7 +458,7 @@
" compute_config = AmlCompute(\n",
" name=compute_name,\n",
" type=\"amlcompute\",\n",
" size=\"Standard_NC6\",\n",
" size=\"Standard_NC6s_v3\",\n",
" idle_time_before_scale_down=120,\n",
" min_instances=0,\n",
" max_instances=4,\n",
Expand Down Expand Up @@ -1107,7 +1107,7 @@
" endpoint_name=online_endpoint_name,\n",
" model=registered_model.id,\n",
" # use GPU instance type like Standard_NC6s_v3 for faster explanations\n",
" instance_type=\"Standard_DS3_V2\",\n",
" instance_type=\"Standard_DS4_V2\",\n",
" instance_count=1,\n",
" request_settings=req_timeout,\n",
" liveness_probe=ProbeSettings(\n",
Expand Down Expand Up @@ -1376,7 +1376,7 @@
"# visualize explanations of the first image against one of the class\n",
"img_bytes = base64_to_img(predictions[0][\"visualizations\"])\n",
"image = Image.open(BytesIO(img_bytes))\n",
"display(image)"
"plt.imshow(image)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@
" compute_config = AmlCompute(\n",
" name=compute_name,\n",
" type=\"amlcompute\",\n",
" size=\"Standard_NC6\",\n",
" size=\"Standard_NC6s_v3\",\n",
" idle_time_before_scale_down=120,\n",
" min_instances=0,\n",
" max_instances=4,\n",
Expand Down Expand Up @@ -1088,7 +1088,7 @@
" endpoint_name=online_endpoint_name,\n",
" model=registered_model.id,\n",
" # use GPU instance type like Standard_NC6s_v3 for faster explanations\n",
" instance_type=\"Standard_DS3_V2\",\n",
" instance_type=\"Standard_DS4_V2\",\n",
" instance_count=1,\n",
" request_settings=req_timeout,\n",
" liveness_probe=ProbeSettings(\n",
Expand Down Expand Up @@ -1364,7 +1364,7 @@
"# visualize explanations of the first image against one of the classes\n",
"img_bytes = base64_to_img(predictions[0][\"visualizations\"][0])\n",
"image = Image.open(BytesIO(img_bytes))\n",
"display(image)"
"plt.imshow(image)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@
" compute_config = AmlCompute(\n",
" name=compute_name,\n",
" type=\"amlcompute\",\n",
" size=\"Standard_NC6\",\n",
" size=\"Standard_NC6s_v3\",\n",
" idle_time_before_scale_down=120,\n",
" min_instances=0,\n",
" max_instances=4,\n",
Expand Down Expand Up @@ -1200,7 +1200,7 @@
" name=\"is-fridge-items-mlflow-dpl\",\n",
" endpoint_name=online_endpoint_name,\n",
" model=registered_model.id,\n",
" instance_type=\"Standard_DS3_V2\",\n",
" instance_type=\"Standard_DS4_V2\",\n",
" instance_count=1,\n",
" liveness_probe=ProbeSettings(\n",
" failure_threshold=30,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@
" name=\"od-fridge-items-mlflow-deploy\",\n",
" endpoint_name=online_endpoint_name,\n",
" model=registered_model.id,\n",
" instance_type=\"Standard_DS3_V2\",\n",
" instance_type=\"Standard_DS4_V2\",\n",
" instance_count=1,\n",
" liveness_probe=ProbeSettings(\n",
" failure_threshold=30,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@
"source": [
"from azureml.core.compute import AmlCompute, ComputeTarget\n",
"\n",
"cluster_name = \"gpu-cluster-nc6\"\n",
"cluster_name = \"gpu-cluster-nc6sv3\"\n",
"\n",
"try:\n",
" compute_target = ws.compute_targets[cluster_name]\n",
" print(\"Found existing compute target.\")\n",
"except KeyError:\n",
" print(\"Creating a new compute target...\")\n",
" compute_config = AmlCompute.provisioning_configuration(\n",
" vm_size=\"Standard_NC6\",\n",
" vm_size=\"Standard_NC6s_v3\",\n",
" idle_seconds_before_scaledown=600,\n",
" min_nodes=0,\n",
" max_nodes=4,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"source": [
"from azureml.core.compute import AmlCompute, ComputeTarget\n",
"\n",
"cluster_name = \"gpu-cluster-nc6\"\n",
"cluster_name = \"gpu-cluster-nc6sv3\"\n",
"\n",
"try:\n",
" compute_target = ws.compute_targets[cluster_name]\n",
Expand Down Expand Up @@ -567,7 +567,7 @@
"except ComputeTargetException:\n",
" print(\"Creating a new compute target...\")\n",
" # Provision AKS cluster with a CPU machine\n",
" prov_config = AksCompute.provisioning_configuration(vm_size=\"STANDARD_D3_V2\")\n",
" prov_config = AksCompute.provisioning_configuration(vm_size=\"Standard_DS4_V2\")\n",
" # Create the cluster\n",
" aks_target = ComputeTarget.create(\n",
" workspace=ws, name=aks_name, provisioning_configuration=prov_config\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"source": [
"from azureml.core.compute import AmlCompute, ComputeTarget\n",
"\n",
"cluster_name = \"gpu-cluster-nc6\"\n",
"cluster_name = \"gpu-cluster-nc6sv3\"\n",
"\n",
"try:\n",
" compute_target = ws.compute_targets[cluster_name]\n",
Expand Down Expand Up @@ -562,7 +562,7 @@
"except ComputeTargetException:\n",
" print(\"Creating a new compute target...\")\n",
" # Provision AKS cluster with a CPU machine\n",
" prov_config = AksCompute.provisioning_configuration(vm_size=\"STANDARD_D3_V2\")\n",
" prov_config = AksCompute.provisioning_configuration(vm_size=\"Standard_DS4_V2\")\n",
" # Create the cluster\n",
" aks_target = ComputeTarget.create(\n",
" workspace=ws, name=aks_name, provisioning_configuration=prov_config\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"source": [
"from azureml.core.compute import AmlCompute, ComputeTarget\n",
"\n",
"cluster_name = \"gpu-cluster-nc6\"\n",
"cluster_name = \"gpu-cluster-nc6sv3\"\n",
"\n",
"try:\n",
" compute_target = ws.compute_targets[cluster_name]\n",
Expand Down Expand Up @@ -546,7 +546,7 @@
"except ComputeTargetException:\n",
" print(\"Creating a new compute target...\")\n",
" # Provision AKS cluster with a CPU machine\n",
" prov_config = AksCompute.provisioning_configuration(vm_size=\"STANDARD_D3_V2\")\n",
" prov_config = AksCompute.provisioning_configuration(vm_size=\"Standard_DS4_V2\")\n",
" # Create the cluster\n",
" aks_target = ComputeTarget.create(\n",
" workspace=ws, name=aks_name, provisioning_configuration=prov_config\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"source": [
"from azureml.core.compute import AmlCompute, ComputeTarget\n",
"\n",
"cluster_name = \"gpu-cluster-nc6\"\n",
"cluster_name = \"gpu-cluster-nc6sv3\"\n",
"\n",
"try:\n",
" compute_target = ws.compute_targets[cluster_name]\n",
Expand Down Expand Up @@ -630,7 +630,7 @@
"except ComputeTargetException:\n",
" print(\"Creating a new compute target...\")\n",
" # Provision AKS cluster with a CPU machine\n",
" prov_config = AksCompute.provisioning_configuration(vm_size=\"STANDARD_D3_V2\")\n",
" prov_config = AksCompute.provisioning_configuration(vm_size=\"Standard_DS4_V2\")\n",
" # Create the cluster\n",
" aks_target = ComputeTarget.create(\n",
" workspace=ws, name=aks_name, provisioning_configuration=prov_config\n",
Expand Down

0 comments on commit bff4840

Please sign in to comment.