Skip to content

Commit 7bfbc29

Browse files
Merge pull request #105639 from ScarlettFalls/tutorial-4
End to End tutorial - train deploy misc fixes
2 parents aceb5ba + 422621d commit 7bfbc29

File tree

2 files changed

+33
-21
lines changed

2 files changed

+33
-21
lines changed
83 KB
Loading

articles/iot-edge/tutorial-machine-learning-edge-04-train-model.md

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: 'In this tutorial, you will train a machine learning model using Az
44
author: kgremban
55
manager: philmea
66
ms.author: kgremban
7-
ms.date: 2/10/2020
7+
ms.date: 3/23/2020
88
ms.topic: tutorial
99
ms.service: iot-edge
1010
services: iot-edge
@@ -56,7 +56,9 @@ We will upload sample notebook files into a new Azure Notebooks project.
5656

5757
1. From the user page of your new account, select **My Projects** from the top menu bar.
5858

59-
1. On the **Create New Project** dialog box, provide a **Project Name** that also automatically forms the **Project ID**.
59+
1. Add a new project by selecting the **+** button.
60+
61+
1. On the **Create New Project** dialog box, provide a **Project Name**.
6062

6163
1. Leave **Public** and **README** unchecked as there is no need for the project to be public or to have a readme.
6264

@@ -68,6 +70,8 @@ We will upload sample notebook files into a new Azure Notebooks project.
6870

6971
1. Navigate to **C:\source\IoTEdgeAndMlSample\AzureNotebooks**. Select all the files in the list and click **Open**.
7072

73+
1. Check the **I trust the content of these files** box.
74+
7175
1. Select **Upload** to begin uploading and then select **Done** once the process is complete.
7276

7377
### Azure notebook files
@@ -90,7 +94,7 @@ Let's review the files you uploaded into your Azure Notebooks project. The activ
9094

9195
* **Test\_FD003.txt:** This file contains the data we will use as our test set when validating our trained classifier. We chose to use the test data, as provided for the original contest, as our test set for its simplicity.
9296

93-
* **RUL\_FD003.txt:** This file contains the RUL for the last cycle of each device in the Test\_FD003.txt file. See the readme.txt and the Damage Propagation Modeling.pdf files in the C:\\source\\IoTEdgeAndMlSample\\data\\Turbofan for a detailed explanation of the data.
97+
* **RUL\_FD003.txt:** This file contains the Remaining Useful Life (RUL) for the last cycle of each device in the Test\_FD003.txt file. See the readme.txt and the Damage Propagation Modeling.pdf files in the C:\\source\\IoTEdgeAndMlSample\\data\\Turbofan for a detailed explanation of the data.
9498

9599
* **Utils.py:** Contains a set of Python utility functions for working with data. The first notebook contains a detailed explanation of the functions.
96100

@@ -104,42 +108,40 @@ Now that the project is created, you can run the notebooks.
104108

105109
![Select first notebook to run](media/tutorial-machine-learning-edge-04-train-model/select-turbofan-regression-notebook.png)
106110

107-
1. If prompted, choose the Python 3.6 Kernel from the dialog and select **Set Kernel**.
108-
109111
1. If the notebook is listed as **Not Trusted**, click on the **Not Trusted** widget in the top right of the notebook. When the dialog comes up, select **Trust**.
110112

111-
1. In the notebook, scroll down to the cell that follows the **Set global properties** instructions and that begins with the code `AZURE_SUBSCRIPTION_ID =` and fill in the values for your Azure subscription, settings, and resources.
112-
113-
![Set global properties in the notebook](media/tutorial-machine-learning-edge-04-train-model/set-global-properties.png)
114-
115-
1. Run that cell by selecting **Run** on the toolbar.
113+
1. For best results, read the documentation for each cell and run it individually. Select **Run** on the toolbar. Later on, you will find it expedient to run multiple cells. You can disregard upgrade and deprecation warnings.
116114

117-
When a cell is running, it displays an asterisk between the square brackets ([\*]). When the cell's operation is complete, the asterisk is replaced with a number and relevant output may appear. The cells in a notebook build sequentially and only one can be running at a time.
115+
When a cell is running, it displays an asterisk between the square brackets ([\*]). When the cell's operation is complete, the asterisk is replaced with a number and relevant output may appear. The cells in a notebook build sequentially and only one can be running at a time.
118116

119-
Follow the instructions in the notebook. You can also use run options from the **Cell** menu, `Ctrl` + `Enter` to run a cell, and `Shift` + `Enter` to run a cell and advance to the next cell.
117+
You can also use run options from the **Cell** menu, `Ctrl` + `Enter` to run a cell, and `Shift` + `Enter` to run a cell and advance to the next cell.
120118

121119
> [!TIP]
122120
> For consistent cell operations, avoid running the same notebook from multiple tabs in your browser.
123121
124-
1. Scroll down to the cell that immediately follows the **Create a workspace** overview text and run that cell. In the cell's output, look for the link that instructs you to sign in to authenticate.
122+
1. In the cell that follows the **Set global properties** instructions, write in the values for your Azure subscription, settings, and resources. Then run the cell.
123+
124+
![Set global properties in the notebook](media/tutorial-machine-learning-edge-04-train-model/set-global-properties.png)
125+
126+
1. In the cell previous to **Workspace details**, after it has run, look for the link that instructs you to sign in to authenticate:
125127

126128
![Sign in prompt for device authentication](media/tutorial-machine-learning-edge-04-train-model/sign-in-prompt.png)
127129

128130
Open the link and enter the specified code. This sign-in procedure authenticates the Jupyter notebook to access Azure resources using the Microsoft Azure Cross-Platform Command Line Interface.
129131

130132
![Authenticate application on device confirmation](media/tutorial-machine-learning-edge-04-train-model/cross-platform-cli.png)
131133

132-
1. At this point, you can run the rest of the cells. It is optimal to run all the cells so that the code in the cells runs sequentially. Select **Run All** from the **Cell** menu. Scroll back up through the notebook and review how the cell operations are completed.
134+
1. In the cell that precedes **Explore the results**, copy the value from the run ID and paste it for the run ID in the cell that follows **Reconstitute a run**.
133135

134-
In the **Explore the data** section, you can review cells in the **Sensor readings and RUL** subsection that render scatterplots of sensor measurements.
136+
![Copy the run ID between cells](media/tutorial-machine-learning-edge-04-train-model/automl-id.png)
135137

136-
![Sensor readings scatterplots](media/tutorial-machine-learning-edge-04-train-model/sensor-readings.png)
138+
1. Run the remaining cells in the notebook.
137139

138-
1. Save the notebook and return to your project page by clicking your project name in the upper-right corner of the notebook or going back in your browser.
140+
1. Save the notebook and return to your project page.
139141

140-
1. Open **02-turbofan\_deploy\_model.ipynb** and repeat the steps in this procedure to run the second notebook.
142+
1. Open **02-turbofan\_deploy\_model.ipynb** and run each cell. You will need to sign-into to authenticate in the cell that follows **Configure workspace**.
141143

142-
1. Save the notebook and return to your project page by clicking your project name in the upper-right corner of the notebook or going back in your browser.
144+
1. Save the notebook and return to your project page.
143145

144146
### Verify success
145147

@@ -155,11 +157,21 @@ To verify that the notebooks have completed successfully, verify that a few item
155157
| ./aml_config/model_config.json | Configuration file that we will need to deploy the model in the **turbofanDemo** Machine Learning workspace in Azure. |
156158
| myenv.yml| Provides information about the dependencies for the deployed Machine Learning model.|
157159

158-
1. Verify in the Azure portal that the **turboFanDemo** Machine Learning workspace exists in your resource group.
160+
1. Verify that the following Azure resources were created. Some resources names are appended with random characters.
161+
162+
| Azure resource | Name |
163+
| --- | --- |
164+
| Machine Learning workspace | turborfanDemo |
165+
| Container Registry | turbofandemoxxxxxxxx |
166+
| Applications Insights | turbofaninsightxxxxxxxx |
167+
| Key Vault | turbofankeyvaultbxxxxxxxx |
168+
| Storage | turbofanstoragexxxxxxxxx |
159169

160170
### Debugging
161171

162-
You can inset Python statements into the notebook for debugging, mainly the `print()` command. If you see variables or objects that are not defined, run the cells where they are first declared or instantiated.
172+
You can insert Python statements into the notebook for debugging, such as the `print()` command to show values. If you see variables or objects that are not defined, run the cells where they are first declared or instantiated.
173+
174+
You may have to delete previously created files and Azure resources if you need to redo the notebooks.
163175

164176
## Next steps
165177

0 commit comments

Comments
 (0)