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-r-train-model.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,8 +24,8 @@ This article explains how to take the R script that you [adapted to run in produ
24
24
## Prerequisites
25
25
26
26
- An [Azure Machine Learning workspace](quickstart-create-resources.md).
27
-
-[A registered data asset](how-to-create-data-assets.md) that your training job will use.
28
-
- Azure [CLI and ml extension installed](how-to-configure-cli.md). Or use a [compute instance in your workspace](quickstart-create-resources.md), which has the CLI preinstalled.
27
+
-[A registered data asset](how-to-create-data-assets.md) that your training job uses.
28
+
- Azure [CLI and ml extension installed](how-to-configure-cli.md). Or use a [compute instance in your workspace](quickstart-create-resources.md), which has the CLI preinstalled.
29
29
-[A compute cluster](how-to-create-attach-compute-cluster.md) or [compute instance](quickstart-create-resources.md#create-a-compute-instance) to run your training job.
30
30
-[An R environment](how-to-r-modify-script-for-production.md#create-an-environment) for the compute cluster to use to run the job.
31
31
@@ -50,11 +50,11 @@ Create this folder structure for your project:
50
50
51
51
## Prepare the job YAML
52
52
53
-
Azure Machine Learning CLI v2 has different [different YAML schemas](reference-yaml-overview.md) for different operations. You'll use the [job YAML schema](reference-yaml-job-command.md) to submit a job. This is the **job.yml** file that is a part of this project.
53
+
Azure Machine Learning CLI v2 has different [different YAML schemas](reference-yaml-overview.md) for different operations. You use the [job YAML schema](reference-yaml-job-command.md) to submit a job in the **job.yml** file that is a part of this project.
54
54
55
-
You'll need to gather specific pieces of information to put into the YAML:
55
+
You need to gather specific pieces of information to put into the YAML:
56
56
57
-
- The name of the registered data asset you'll use as the data input (with version): `azureml:<REGISTERED-DATA-ASSET>:<VERSION>`
57
+
- The name of the registered data asset you use as the data input (with version): `azureml:<REGISTERED-DATA-ASSET>:<VERSION>`
58
58
- The name of the environment you created (with version): `azureml:<R-ENVIRONMENT-NAME>:<VERSION>`
59
59
- The name of the compute cluster: `azureml:<COMPUTE-CLUSTER-NAME>`
60
60
@@ -65,7 +65,7 @@ You'll need to gather specific pieces of information to put into the YAML:
65
65
66
66
### Sample YAML schema to submit a job
67
67
68
-
Edit your **job.yml** file to contain the following. Make sure to replace values shown `<IN-BRACKETS-AND-CAPS>` and remove the brackets.
68
+
Edit your **job.yml** file to contain the following. Make sure to replace values shown `<IN-BRACKETS-AND-CAPS>` and remove the brackets.
@@ -101,7 +101,7 @@ Find these values from [Azure Machine Learning studio](https://ml.azure.com):
101
101
102
102
1. Sign in and open your workspace.
103
103
1. In the upper right Azure Machine Learning studio toolbar, select your workspace name.
104
-
1. You can copy the values from the section that appears.
104
+
1. You can copy the values from the section that appears.
105
105
106
106
:::image type="content" source="media/how-to-r-train-model/find-values.png" alt-text="Screenshot: Find the values to use in your CLI command." lightbox="media/how-to-r-train-model/find-values.png":::
107
107
@@ -113,7 +113,7 @@ To submit the job, run the following commands in a terminal window:
113
113
cd r-job-azureml
114
114
```
115
115
116
-
1. Sign in to Azure. If you're doing this from an [Azure Machine Learning compute instance](quickstart-create-resources.md#create-a-compute-instance), use:
116
+
1. Sign in to Azure. If you're doing this from an [Azure Machine Learning compute instance](quickstart-create-resources.md#create-a-compute-instance), use:
117
117
118
118
```azurecli
119
119
az login --identity
@@ -127,13 +127,13 @@ To submit the job, run the following commands in a terminal window:
127
127
az upgrade
128
128
```
129
129
130
-
1. If you have multiple Azure subscriptions, set the active subscription to the one you're using for your workspace. (You can skip this step if you only have access to a single subscription.) Replace `<SUBSCRIPTION-NAME>` with your subscription name. Also remove the brackets `<>`.
130
+
1. If you have multiple Azure subscriptions, set the active subscription to the one you're using for your workspace. (You can skip this step if you only have access to a single subscription.) Replace `<SUBSCRIPTION-NAME>` with your subscription name. Also remove the brackets `<>`.
131
131
132
132
```azurecli
133
133
az account set --subscription "<SUBSCRIPTION-NAME>"
134
134
```
135
135
136
-
1. Now use CLI to submit the job. If you're doing this on a compute instance in your workspace, you can use environment variables for the workspace name and resource group as show in the following code. If you aren't on a compute instance, replace these values with your workspace name and resource group.
136
+
1. Now use CLI to submit the job. If you're doing this on a compute instance in your workspace, you can use environment variables for the workspace name and resource group as show in the following code. If you aren't on a compute instance, replace these values with your workspace name and resource group.
137
137
138
138
```azurecli
139
139
az ml job create -f job.yml --workspace-name $CI_WORKSPACE --resource-group $CI_RESOURCE_GROUP
@@ -145,28 +145,28 @@ Once you've submitted the job, you can check the status and results in studio:
145
145
1. Select your workspace if it isn't already loaded.
146
146
1. On the left navigation, select **Jobs**.
147
147
1. Select the **Experiment name** that you used to train your model.
148
-
1. Select the **Display name** of the job to view details and artifacts of the job, including metrics, images, child jobs, outputs, logs, and code used in the job.
148
+
1. Select the **Display name** of the job to view details and artifacts of the job, including metrics, images, child jobs, outputs, logs, and code used in the job.
149
149
150
150
151
151
## Register model
152
152
153
-
Finally, once the training job is complete, register your model if you want to deploy it. Start in the studio from the page showing your job details.
153
+
Finally, once the training job is complete, register your model if you want to deploy it. Start in the studio from the page showing your job details.
154
154
155
155
1. Once your job completes, select **Outputs + logs** to view outputs of the job.
156
-
1. Open the **models** folder to verify that **crate.bin** and **MLmodel** are present. If not, check the logs to see if there was an error.
156
+
1. Open the **models** folder to verify that **crate.bin** and **MLmodel** are present. If not, check the logs to see if there was an error.
157
157
1. On the toolbar at the top, select **+ Register model**.
158
158
159
159
:::image type="content" source="media/how-to-r-train-model/register-model.png" alt-text="Screenshot shows the Job section of studio with the Outputs section open.":::
160
160
161
-
1. Do not use the **MLflow** model type, even though it is detected. Change **Model type** from the default **MLflow** to **Unspecified type**. Leaving it as **MLflow** will cause an error.
161
+
1. Don't use the **MLflow** model type, even though it's detected. Change **Model type** from the default **MLflow** to **Unspecified type**. Leaving it as **MLflow** will cause an error.
162
162
1. For **Job output**, select **models**, the folder that contains the model.
163
163
1. Select **Next**.
164
-
1. Supply the name you wish to use for your model. Add **Description**, **Version**, and **Tags** if you wish.
164
+
1. Supply the name you wish to use for your model. Add **Description**, **Version**, and **Tags** if you wish.
165
165
1. Select **Next**.
166
166
1. Review the information.
167
167
1. Select **Register**.
168
168
169
-
At the top of the page, you'll see a confirmation that the model is registered. The confirmation looks similar to this:
169
+
At the top of the page, you'll see a confirmation that the model is registered. The confirmation looks similar to this:
170
170
171
171
:::image type="content" source="media/how-to-r-train-model/registered.png" alt-text="Screenshot shows example of successful registration.":::
0 commit comments