Skip to content

Commit a9660da

Browse files
authored
Merge pull request #3946 from cdpark/refresh-ai-batch3a
Feature 411216: Q&M: AI Freshness - Azure Machine Learning - batch 3
2 parents 82e7908 + 933fd36 commit a9660da

File tree

5 files changed

+103
-104
lines changed

5 files changed

+103
-104
lines changed
11.9 KB
Loading
Loading

articles/machine-learning/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ items:
891891
href: ./v1/how-to-create-machine-learning-pipelines.md
892892
- name: Moving data into and between ML pipeline steps (Python)
893893
href: ./v1/how-to-move-data-in-out-of-pipelines.md
894-
- name: Use automated ML in ML pipelines (Python)
894+
- name: Use AutoML in machine learning pipelines (Python)
895895
displayName: machine learning automl
896896
href: ./v1/how-to-use-automlstep-in-pipelines.md
897897
- name: Deploy ML pipelines (Python)
Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
---
2-
title: "Tutorial: Train image classification model: VS Code (preview)"
2+
title: "Train Image Classification Model with VS Code Extension"
33
titleSuffix: Azure Machine Learning
4-
description: Learn how to train an image classification model using TensorFlow and the Azure Machine Learning Visual Studio Code Extension
4+
description: Learn how to train a TensorFlow image classification model using the Azure Machine Learning Visual Studio Code extension.
55
services: machine-learning
66
ms.service: azure-machine-learning
77
ms.subservice: core
88
ms.topic: tutorial
99
author: ssalgadodev
1010
ms.author: ssalgado
1111
ms.reviewer: tbombach
12-
ms.date: 01/25/2024
12+
ms.date: 04/03/2025
1313
ms.custom:
1414
- cliv2
1515
- build-2023
1616
- ignite-2023
1717
#Customer intent: As a professional data scientist, I want to learn how to train an image classification model using TensorFlow and the Azure Machine Learning Visual Studio Code Extension.
1818
---
1919

20-
# Tutorial: Train an image classification TensorFlow model using the Azure Machine Learning Visual Studio Code Extension (preview)
20+
# Tutorial: Train an image classification model by using the Azure Machine Learning Visual Studio Code extension (preview)
2121

2222
[!INCLUDE [cli v2](includes/machine-learning-cli-v2.md)]
2323

24-
Learn how to train an image classification model to recognize hand-written numbers using TensorFlow and the Azure Machine Learning Visual Studio Code Extension.
24+
This article explains how to train an image classification model to recognize hand-written numbers by using TensorFlow and the Azure Machine Learning Visual Studio Code extension.
2525

2626
[!INCLUDE [machine-learning-preview-generic-disclaimer](includes/machine-learning-preview-generic-disclaimer.md)]
2727

@@ -34,33 +34,32 @@ In this tutorial, you learn the following tasks:
3434
3535
## Prerequisites
3636

37-
- Azure subscription. If you don't have one, sign up to try the [free or paid version of Azure Machine Learning](https://azure.microsoft.com/free/). If you're using the free subscription, only CPU clusters are supported.
38-
- Install [Visual Studio Code](https://code.visualstudio.com/docs/setup/setup-overview), a lightweight, cross-platform code editor.
39-
- Azure Machine Learning studio Visual Studio Code extension. For install instructions, see the [Setup Azure Machine Learning Visual Studio Code extension guide](./how-to-setup-vs-code.md)
40-
- CLI (v2). For installation instructions, see [Install, set up, and use the CLI (v2)](how-to-configure-cli.md)
41-
- Clone the community driven repository
37+
- An Azure subscription. If you don't have one, sign up for a [free or paid version of Azure Machine Learning](https://azure.microsoft.com/free/). If you're using the free subscription, only CPU clusters are supported.
38+
- [Visual Studio Code](https://code.visualstudio.com/docs/setup/setup-overview), a lightweight, cross-platform code editor.
39+
- Azure Machine Learning studio Visual Studio Code extension. For installation instructions, see [Setup Azure Machine Learning Visual Studio Code extension](./how-to-setup-vs-code.md).
40+
- CLI (v2). For installation instructions, see [Install and set up the CLI (v2)](how-to-configure-cli.md)
41+
- Clone the community-driven [Azure Machine Learning examples repository](https://github.com/Azure/azureml-examples):
4242
```bash
43-
git clone https://github.com/Azure/azureml-examples.git
43+
git clone https://github.com/Azure/azureml-examples.git
4444
```
4545

4646
## Understand the code
4747

48-
The code for this tutorial uses TensorFlow to train an image classification machine learning model that categorizes handwritten digits from 0-9. It does so by creating a neural network that takes the pixel values of 28 px x 28 px image as input and outputs a list of 10 probabilities, one for each of the digits being classified. This is a sample of what the data looks like.
48+
The code for this tutorial uses TensorFlow to train an image classification machine learning model that categorizes handwritten digits from 0-9. It does so by creating a neural network that takes the pixel values of 28x28-pixel images as input, and then outputs a list of 10 probabilities, one for each of the digits being classified. The following sample shows what the data looks like.
4949

50-
![MNIST Digits](./media/tutorial-train-deploy-image-classification-model-vscode/digits.png)
50+
:::image type="content" source="media/tutorial-train-deploy-image-classification-model-vscode/digits.png" alt-text="Screenshot that shows a sample of MNIST digits.":::
5151

5252
## Create a workspace
5353

54-
The first thing you have to do to build an application in Azure Machine Learning is to create a workspace. A workspace contains the resources to train models and the trained models themselves. For more information, see [what is a workspace](./concept-workspace.md).
54+
To build an application in Azure Machine Learning, you first need to create a workspace. A workspace contains the resources to train models and also the trained models themselves. For more information, see [What is an Azure Machine Learning workspace?](./concept-workspace.md)
5555

56-
1. Open the *azureml-examples/cli/jobs/single-step/tensorflow/mnist* directory from the community driven repository in Visual Studio Code.
56+
1. In Visual Studio Code, open the *azureml-examples/cli/jobs/single-step/tensorflow/mnist* directory from the examples repository.
5757
1. On the Visual Studio Code activity bar, select the **Azure** icon to open the Azure Machine Learning view.
58-
1. In the Azure Machine Learning view, right-click your subscription node and select **Create Workspace**.
58+
1. Under **Machine Learning**, right-click your subscription node and select **Create workspace**.
5959

60-
> [!div class="mx-imgBorder"]
61-
> ![Create workspace](./media/tutorial-train-deploy-image-classification-model-vscode/create-workspace.png)
60+
:::image type="content" source="media/tutorial-train-deploy-image-classification-model-vscode/create-workspace.png" alt-text="Screenshot that shows the option to create a workspace.":::
6261

63-
1. A specification file appears. Configure the specification file with the following options.
62+
1. A specification file appears. Configure the specification file with the following options and then save it.
6463

6564
```yml
6665
$schema: https://azuremlschemas.azureedge.net/latest/workspace.schema.json
@@ -78,14 +77,13 @@ The first thing you have to do to build an application in Azure Machine Learning
7877
1. Right-click the specification file and select **AzureML: Execute YAML**. Creating a resource uses the configuration options defined in the YAML specification file and submits a job using the CLI (v2). At this point, a request to Azure is made to create a new workspace and dependent resources in your account. After a few minutes, the new workspace appears in your subscription node.
7978
1. Set `TeamWorkspace` as your default workspace. Doing so places resources and jobs you create in the workspace by default. Select the **Set Azure Machine Learning Workspace** button on the Visual Studio Code status bar and follow the prompts to set `TeamWorkspace` as your default workspace.
8079

81-
For more information on workspaces, see [how to manage resources in VS Code](how-to-manage-resources-vscode.md).
80+
For more information on workspaces, see [Manage Azure Machine Learning resources with the VS Code extension](how-to-manage-resources-vscode.md).
8281

8382
## Train the model
8483

8584
During the training process, a TensorFlow model is trained by processing the training data and learning patterns embedded within it for each of the respective digits being classified.
8685

87-
Like workspaces and compute targets, training jobs are defined using resource templates. For this sample, the specification is defined in the *job.yml* file, which looks like the following:
88-
86+
Like workspaces and compute targets, training jobs are defined using resource templates. For this sample, the specification is defined in the *job.yml* file, which is located in the *azureml-examples/cli/jobs/single-step/tensorflow/mnist* folder in the examples repository.
8987

9088
```yml
9189
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
@@ -100,7 +98,7 @@ experiment_name: tensorflow-mnist-example
10098
description: Train a basic neural network with TensorFlow on the MNIST dataset.
10199
```
102100

103-
This specification file submits a training job called `tensorflow-mnist-example` to the recently created `gpu-cluster` computer target that runs the code in the *train.py* Python script. The environment used is one of the curated environments provided by Azure Machine Learning which contains TensorFlow and other software dependencies required to run the training script. For more information on curated environments, see [Azure Machine Learning curated environments](resource-curated-environments.md).
101+
This specification file submits a training job called `tensorflow-mnist-example` to the recently created `gpu-cluster` computer target that runs the code in the *train.py* Python script. The environment used is one of the curated environments provided by Azure Machine Learning, which contains TensorFlow and other software dependencies required to run the training script. For more information on curated environments, see [Azure Machine Learning curated environments](resource-curated-environments.md).
104102

105103
To submit the training job:
106104

@@ -111,14 +109,13 @@ At this point, a request is sent to Azure to run your experiment on the selected
111109

112110
When the dialog requesting to open an external website appears, select **Open**.
113111

114-
> [!div class="mx-imgBorder"]
115-
> ![Track experiment progress](./media/tutorial-train-deploy-image-classification-model-vscode/track-experiment-progress.png)
112+
:::image type="content" source="media/tutorial-train-deploy-image-classification-model-vscode/track-experiment-progress.png" alt-text="Screenshot that shows the job's progress." lightbox="media/tutorial-train-deploy-image-classification-model-vscode/track-experiment-progress.png":::
116113

117-
When the model is done training, the status label next to the run node updates to "Completed".
114+
When the model is done training, the status label next to the run node updates to *Completed*.
118115

119-
## Next steps
116+
## Related content
120117

121-
* [Launch Visual Studio Code integrated with Azure Machine Learning (preview)](how-to-launch-vs-code-remote.md)
122-
* For a walkthrough of how to edit, run, and debug code locally, see the [Python hello-world tutorial](https://code.visualstudio.com/docs/Python/Python-tutorial).
123-
* [Run Jupyter Notebooks in Visual Studio Code](how-to-manage-resources-vscode.md) using a remote Jupyter server.
124-
* For a walkthrough of how to train with Azure Machine Learning outside of Visual Studio Code, see [Tutorial: Train and deploy a model with Azure Machine Learning](tutorial-train-deploy-notebook.md).
118+
* [Launch Visual Studio Code integrated with Azure Machine Learning](how-to-launch-vs-code-remote.md)
119+
* [Get started with a Python tutorial](https://code.visualstudio.com/docs/Python/Python-tutorial)
120+
* [Manage Azure Machine Learning resources with the VS Code extension](how-to-manage-resources-vscode.md)
121+
* [Quickstart: Get started with Azure Machine Learning](tutorial-azure-ml-in-a-day.md)

0 commit comments

Comments
 (0)