Skip to content

Commit 83055e3

Browse files
author
Larry Franks
committed
fixing blockers
1 parent b3215f9 commit 83055e3

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

articles/machine-learning/how-to-train-model.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,16 @@ The REST API examples in this article use `$SUBSCRIPTION_ID`, `$RESOURCE_GROUP`,
116116

117117
Administrative REST requests a [service principal authentication token](how-to-manage-rest.md#retrieve-a-service-principal-authentication-token). You can retrieve a token with the following command. The token is stored in the `$TOKEN` environment variable:
118118

119-
```azurecli
120-
TOKEN=$(az account get-access-token --query accessToken -o tsv)
121-
```
119+
:::code language="azurecli" source="~/azureml-examples-main/deploy-arm-templates-az-cli.sh" id="get_access_token":::
122120

123121
The service provider uses the `api-version` argument to ensure compatibility. The `api-version` argument varies from service to service. Set the API version as a variable to accommodate future versions:
124122

125123
:::code language="rest-api" source="~/azureml-examples-main/cli/deploy-rest.sh" id="api_version":::
126124

125+
When training using the REST API, data and training scripts must be uploaded to a storage account that the workspace can access. The following example gets the storage information for your workspace and saves it into variables so we can use it later:
126+
127+
:::code language="azurecli" source="~/azureml-examples-main/deploy-arm-templates-az-cli.sh" id="get_storage_details":::
128+
127129
---
128130

129131
### 2. Create a compute resource for training
@@ -211,9 +213,15 @@ You can use the stored run ID to return information about the job. The `--web` p
211213

212214
# [REST API](#tab/restapi)
213215

214-
As part of job submission, the training scripts and data must be uploaded to a cloud storage location that your AzureML workspace can access. These examples don't cover the uploading process. For information on using the Blob REST API to upload files, see the [Put Blob](/rest/api/storageservices/put-blob) reference.
216+
As part of job submission, the training scripts and data must be uploaded to a cloud storage location that your AzureML workspace can access.
217+
218+
1. Use the following Azure CLI command to upload the training script. The command specifies the _directory_ that contains the files needed for training, not an individual file. If you'd like to use REST to upload the data instead, see the [Put Blob](/rest/api/storageservices/put-blob) reference:
219+
220+
```azurecli
221+
az storage blob upload-batch -d $AZUREML_DEFAULT_CONTAINER/testjob -s cli/jobs/single-step/scikit-learn/iris/src/ --account-name $AZURE_STORAGE_ACCOUNT
222+
```
215223
216-
1. Create a versioned reference to the training data. In this example, the data is located at `https://azuremlexamples.blob.core.windows.net/datasets/iris.csv`. In your workspace, you might upload the file to the default storage for your workspace:
224+
1. Create a versioned reference to the training data. In this example, the data is already in the cloud and located at `https://azuremlexamples.blob.core.windows.net/datasets/iris.csv`. For more information on referencing data, see [Data in Azure Machine Learning](concept-data.md):
217225
218226
```bash
219227
DATA_VERSION=$RANDOM

0 commit comments

Comments
 (0)