Skip to content

Commit c1c59ff

Browse files
Merge pull request #231644 from amibp/main
New preview feature going out and updating this outdated doc.
2 parents 2431604 + ae5a03b commit c1c59ff

11 files changed

+70
-63
lines changed

articles/machine-learning/how-to-train-with-ui.md

Lines changed: 70 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
22
title: Create a Training Job with the job creation UI
33
titleSuffix: Azure Machine Learning
4-
description: Learn how to use the job creation UI in Azure Machine Learning studio to create a training job.
4+
description: Learn how to submit a training job in Azure Machine Learning studio
55
services: machine-learning
66
ms.service: machine-learning
77
ms.subservice: training
88
ms.topic: how-to
99
ms.custom: devplatv2, event-tier1-build-2022
10-
author: wenxwei
11-
ms.author: wenxwei
10+
author: amibp
11+
ms.author: amipatel
1212
ms.date: 11/04/2022
1313
ms.reviewer: ssalgado
1414
---
1515

16-
# Create a training job with the job creation UI (preview)
16+
# Submit a training job in Studio (preview)
1717

18-
There are many ways to create a training job with Azure Machine Learning. You can use the CLI (see [Train models (create jobs)](how-to-train-model.md)), the REST API (see [Train models with REST (preview)](how-to-train-with-rest.md)), or you can use the UI to directly create a training job. In this article, you'll learn how to use your own data and code to train a machine learning model with the job creation UI in Azure Machine Learning studio.
18+
There are many ways to create a training job with Azure Machine Learning. You can use the CLI (see [Train models (create jobs)](how-to-train-model.md)), the REST API (see [Train models with REST (preview)](how-to-train-with-rest.md)), or you can use the UI to directly create a training job. In this article, you'll learn how to use your own data and code to train a machine learning model with a guided experience for submitting training jobs in Azure Machine Learning studio.
1919

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

@@ -32,19 +32,74 @@ There are many ways to create a training job with Azure Machine Learning. You ca
3232
1. Sign in to [Azure Machine Learning studio](https://ml.azure.com).
3333

3434
1. Select your subscription and workspace.
35+
36+
* Navigate to the Azure Machine Learning Studio and enable the feature by clicking open the preview panel.
37+
[![Azure Machine Learning studio preview panel allowing users to enable preview features.](media/how-to-train-with-ui/preview-panel.png)](media/how-to-train-with-ui/preview-panel.png)
38+
3539

3640
* You may enter the job creation UI from the homepage. Click **Create new** and select **Job**.
3741
[![Azure Machine Learning studio homepage](media/how-to-train-with-ui/home-entry.png)](media/how-to-train-with-ui/home-entry.png)
3842

39-
* Or, you may enter the job creation from the left pane. Click **+New** and select **Job**.
40-
[![Azure Machine Learning studio left navigation](media/how-to-train-with-ui/left-nav-entry.png)](media/how-to-train-with-ui/left-nav-entry.png)
43+
In this wizard, you can select your method of training, complete the rest of the submission wizard based on your selection, and submit the training job. Below we will walk through the wizard for running a custom script (command job).
44+
45+
[![Azure Machine Learning studio wizard landing page for users to choose method of training.](media/how-to-train-with-ui/training-method.png)](media/how-to-train-with-ui/training-method.png)
46+
47+
## Configure basic settings
48+
49+
The first step is configuring basic information about your training job. You can proceed next if you're satisfied with the defaults we have chosen for you or make changes to your desired preference.
50+
51+
[![Azure Machine Learning studio job submission wizard for users to configure their basic settings.](media/how-to-train-with-ui/basic-settings.png)](media/how-to-train-with-ui/basic-settings.png)
52+
53+
These are the fields available:
54+
55+
|Field| Description|
56+
|------| ------|
57+
|Job name| The job name field is used to uniquely identify your job. It's also used as the display name for your job.|
58+
|Experiment name| This helps organize the job in Azure Machine Learning studio. Each job's run record will be organized under the corresponding experiment in the studio's "Experiment" tab. By default, Azure will put the job in the **Default** experiment.|
59+
|Description| Add some text describing your job, if desired.|
60+
|Timeout| Specify number of hours the entire training job is allowed to run. Once this limit is reached the system will cancel the job including any child jobs.|
61+
|Tags| Add tags to your job to help with organization.|
62+
63+
## Training script
64+
65+
Next step is to upload your source code, configure any inputs or outputs required to execute the training job, and specify the command to execute your training script.
66+
67+
This can be a code file or a folder from your local machine or workspace's default blob storage. Azure will show the files to be uploaded after you make the selection.
68+
69+
|Field| Description|
70+
|------| ------|
71+
|Code| This can be a file or a folder from your local machine or workspace's default blob storage as your training script. Studio will show the files to be uploaded after you make the selection.|
72+
|Inputs| Specify as many inputs as needed of the following types data, integer, number, boolean, string). |
73+
|Command| The command to execute. Command-line arguments can be explicitly written into the command or inferred from other sections, specifically **inputs** using curly braces notation, as discussed in the next section.|
74+
75+
76+
### Code
77+
The command is run from the root directory of the uploaded code folder. After you select your code file or folder, you can see the files to be uploaded. Copy the relative path to the code containing your entry point and paste it into the box labeled **Enter the command to start the job**.
78+
79+
If the code is in the root directory, you can directly refer to it in the command. For instance, `python main.py`.
80+
81+
If the code isn't in the root directory, you should use the relative path. For example, the structure of the [word language model](https://github.com/Azure/azureml-examples/tree/main/cli/jobs/single-step/pytorch/word-language-model) is:
82+
83+
```tree
84+
.
85+
├── job.yml
86+
├── data
87+
└── src
88+
└── main.py
89+
```
90+
Here, the source code is in the `src` subdirectory. The command would be `python ./src/main.py` (plus other command-line arguments).
91+
92+
[![Image of referencing your code in the command in the training job submission wizard.](media/how-to-train-with-ui/training-script-code.png)](media/how-to-train-with-ui/training-script-code.png)
93+
94+
### Inputs
4195

96+
When you use an input in the command, you need to specify the input name. To indicate an input variable, use the form `${{inputs.input_name}}`. For instance, `${{inputs.wiki}}`. You can then refer to it in the command, for instance, `--data ${{inputs.wiki}}`.
4297

43-
These options will all take you to the job creation panel, which has a wizard for configuring and creating a training job.
98+
[![Image of referencing your inputs in the command in the training job submission wizard.](media/how-to-train-with-ui/training-script-inputs.png)](media/how-to-train-with-ui/training-script-inputs.png)
4499

45100
## Select compute resources
46101

47-
The first step in the job creation UI is to select the compute target on which you'd like your job to run. The job creation UI supports several compute types:
102+
Next step is to select the compute target on which you'd like your job to run. The job creation UI supports several compute types:
48103

49104
| Compute Type | Introduction |
50105
| --- | --- |
@@ -56,13 +111,9 @@ The first step in the job creation UI is to select the compute target on which y
56111
1. Select an existing compute resource. The dropdown shows the node information and SKU type to help your choice.
57112
1. For a compute cluster or a Kubernetes cluster, you may also specify how many nodes you want for the job in **Instance count**. The default number of instances is 1.
58113
1. When you're satisfied with your choices, choose **Next**.
59-
[![Select a compute cluster](media/how-to-train-with-ui/compute-cluster.png)](media/how-to-train-with-ui/compute-cluster.png)
60-
61-
If you're using Azure Machine Learning for the first time, you'll see an empty list and a link to create a new compute.
62-
63-
[![Create a new compute instance](media/how-to-train-with-ui/create-new-compute.png)](media/how-to-train-with-ui/create-new-compute.png)
114+
[![Select a compute cluster dropdown selector image.](media/how-to-train-with-ui/compute.png)](media/how-to-train-with-ui/compute.png)
64115

65-
For more information on creating the various types, see:
116+
If you're using Azure Machine Learning for the first time, you'll see an empty list and a link to create a new compute. For more information on creating the various types, see:
66117

67118
| Compute Type | How to |
68119
| --- | --- |
@@ -82,67 +133,23 @@ After selecting a compute target, you need to specify the runtime environment fo
82133

83134
Curated environments are Azure-defined collections of Python packages used in common ML workloads. Curated environments are available in your workspace by default. These environments are backed by cached Docker images, which reduce the job preparation overhead. The cards displayed in the "Curated environments" page show details of each environment. To learn more, see [curated environments in Azure Machine Learning](resource-curated-environments.md).
84135

85-
[![Curated environments](media/how-to-train-with-ui/curated-env.png)](media/how-to-train-with-ui/curated-env.png)
136+
[![Image of curated environments selector page showing various environment cards.](media/how-to-train-with-ui/curated-environments.png)](media/how-to-train-with-ui/curated-environments.png)
86137

87138
### Custom environments
88139

89140
Custom environments are environments you've specified yourself. You can specify an environment or reuse an environment that you've already created. To learn more, see [Manage software environments in Azure Machine Learning studio (preview)](how-to-manage-environments-in-studio.md#create-an-environment).
90141

91142
### Container registry image
92143

93-
If you don't want to use the Azure Machine Learning curated environments or specify your own custom environment, you can use a docker image from a public container registry such as [Docker Hub](https://hub.docker.com/). If the image is in a private container, toggle **This is a private container registry**. For private registries, you will need to enter a valid username and password so Azure can get the image.
94-
[![Container registry image](media/how-to-train-with-ui/container-registry-image.png)](media/how-to-train-with-ui/container-registry-image.png)
95-
96-
## Configure your job
97-
98-
After specifying the environment, you can configure your job with more settings.
99-
100-
|Field| Description|
101-
|------| ------|
102-
|Job name| The job name field is used to uniquely identify your job. It's also used as the display name for your job. Setting this field is optional; Azure will generate a GUID name for the job if you don't enter anything. Note: the job name must be unique.|
103-
|Experiment name| This helps organize the job in Azure Machine Learning studio. Each job's run record will be organized under the corresponding experiment in the studio's "Experiment" tab. By default, Azure will put the job in the **Default** experiment.|
104-
|Code| You can upload a code file or a folder from your machine, or upload a code file from the workspace's default blob storage. Azure will show the files to be uploaded after you make the selection. |
105-
|Command| The command to execute. Command-line arguments can be explicitly written into the command or inferred from other sections, specifically **inputs** using curly braces notation, as discussed in the next section.|
106-
|Inputs| Specify the input binding. We support three types of inputs: 1) Azure Machine Learning registered dataset; 2) workspace default blob storage; 3) upload local file. You can add multiple inputs. |
107-
|Environment variables| Setting environment variables allows you to provide dynamic configuration of the job. You can add the variable and value here.|
108-
|Tags| Add tags to your job to help with organization.|
109-
110-
### Specify code and inputs in the command box
144+
If you don't want to use the Azure Machine Learning curated environments or specify your own custom environment, you can use a docker image from a public container registry such as [Docker Hub](https://hub.docker.com/).
111145

112-
#### Code
113-
114-
The command is run from the root directory of the uploaded code folder. After you select your code file or folder, you can see the files to be uploaded. Copy the relative path to the code containing your entry point and paste it into the box labeled **Enter the command to start the job**.
115-
116-
If the code is in the root directory, you can directly refer to it in the command. For instance, `python main.py`.
117-
118-
If the code isn't in the root directory, you should use the relative path. For example, the structure of the [word language model](https://github.com/Azure/azureml-examples/tree/main/cli/jobs/single-step/pytorch/word-language-model) is:
119-
120-
```tree
121-
.
122-
├── job.yml
123-
├── data
124-
└── src
125-
└── main.py
126-
```
127-
Here, the source code is in the `src` subdirectory. The command would be `python ./src/main.py` (plus other command-line arguments).
128-
129-
[![Refer code in the command](media/how-to-train-with-ui/code-command.png)](media/how-to-train-with-ui/code-command.png)
130-
131-
#### Inputs
132-
133-
When you use an input in the command, you need to specify the input name. To indicate an input variable, use the form `${{inputs.input_name}}`. For instance, `${{inputs.wiki}}`. You can then refer to it in the command, for instance, `--data ${{inputs.wiki}}`.
134-
135-
[![Refer input name in the command](media/how-to-train-with-ui/input-command-name.png)](media/how-to-train-with-ui/input-command-name.png)
136146

137147
## Review and Create
138148

139149
Once you've configured your job, choose **Next** to go to the **Review** page. To modify a setting, choose the pencil icon and make the change.
150+
[![Azure Machine Learning studio job submission review pane image to validate selections before submission.](media/how-to-train-with-ui/review.png)](media/how-to-train-with-ui/review.png)
140151

141-
You may choose **view the YAML spec** to review and download the yaml file generated by this job configuration. This job yaml file can be used to submit the job from the CLI (v2). (See [Train models (create jobs) with the CLI (v2)](how-to-train-cli.md).)
142-
[![view yaml spec](media/how-to-train-with-ui/view-yaml.png)](media/how-to-train-with-ui/view-yaml.png)
143-
[![Yaml spec](media/how-to-train-with-ui/yaml-spec.png)](media/how-to-train-with-ui/yaml-spec.png)
144-
145-
To launch the job, choose **Create**. Once the job is created, Azure will show you the job details page, where you can monitor and manage your training job.
152+
To launch the job, choose **Submit training job**. Once the job is created, Azure will show you the job details page, where you can monitor and manage your training job.
146153

147154
[!INCLUDE [Email Notification Include](../../includes/machine-learning-email-notifications.md)]
148155

100 KB
Loading
97.2 KB
Loading
360 KB
Loading
145 KB
Loading
216 KB
Loading
118 KB
Loading
121 KB
Loading
122 KB
Loading
121 KB
Loading

0 commit comments

Comments
 (0)