You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-set-up-training-targets.md
+9-35Lines changed: 9 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,32 +146,19 @@ Use the Azure Data Science Virtual Machine (DSVM) as the Azure VM of choice for
146
146
> [!WARNING]
147
147
> Azure Machine Learning only supports virtual machines that run Ubuntu. When you create a VM or choose an existing VM, you must select a VM that uses Ubuntu.
148
148
149
-
1.**Attach**: To attach an existing virtual machine as a compute target, you must provide the fully qualified domain name (FQDN), user name, and password for the virtual machine. In the example, replace \<fqdn> with the public FQDN of the VM, or the public IP address. Replace \<username> and \<password> with the SSH user name and password for the VM.
150
-
151
-
> [!IMPORTANT]
152
-
> The following Azure regions do not support attaching a virtual machine using the public IP address of the VM. Instead, use the Azure Resource Manager ID of the VM with the `resource_id` parameter:
153
-
>
154
-
> * US East
155
-
> * US West 2
156
-
> * US South Central
157
-
>
158
-
> The resource ID of the VM can be constructed using the subscription ID, resource group name, and VM name using the following string format: `/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Compute/virtualMachines/<vm_name>`.
159
-
149
+
1.**Attach**: To attach an existing virtual machine as a compute target, you must provide the resource ID, user name, and password for the virtual machine. The resource ID of the VM can be constructed using the subscription ID, resource group name, and VM name using the following string format: `/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Compute/virtualMachines/<vm_name>`
160
150
151
+
161
152
```python
162
153
from azureml.core.compute import RemoteCompute, ComputeTarget
# If you authenticate with SSH keys instead, use this code:
177
164
# ssh_port=22,
@@ -205,28 +192,15 @@ Azure HDInsight is a popular platform for big-data analytics. The platform provi
205
192
206
193
After the cluster is created, connect to it with the hostname \<clustername>-ssh.azurehdinsight.net, where \<clustername> is the name that you provided for the cluster.
207
194
208
-
1.**Attach**: To attach an HDInsight cluster as a compute target, you must provide the hostname, user name, and password for the HDInsight cluster. The following example uses the SDK to attach a cluster to your workspace. In the example, replace \<clustername> with the name of your cluster. Replace \<username> and \<password> with the SSH user name and password for the cluster.
209
-
210
-
> [!IMPORTANT]
211
-
> The following Azure regions do not support attaching an HDInsight cluster using the public IP address of the cluster. Instead, use the Azure Resource Manager ID of the cluster with the `resource_id` parameter:
212
-
>
213
-
> * US East
214
-
> * US West 2
215
-
> * US South Central
216
-
>
217
-
> The resource ID of the cluster can be constructed using the subscription ID, resource group name, and cluster name using the following string format: `/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.HDInsight/clusters/<cluster_name>`.
195
+
1.**Attach**: To attach an HDInsight cluster as a compute target, you must provide the resource ID, user name, and password for the HDInsight cluster. The resource ID of the HDInsight cluster can be constructed using the subscription ID, resource group name, and HDInsight cluster name using the following string format: `/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.HDInsight/clusters/<cluster_name>`
218
196
219
197
```python
220
198
from azureml.core.compute import ComputeTarget, HDInsightCompute
221
199
from azureml.exceptions import ComputeTargetException
222
200
223
201
try:
224
202
# if you want to connect using SSH key instead of username/password you can provide parameters private_key_file and private_key_passphrase
0 commit comments