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/iot-edge/tutorial-machine-learning-edge-04-train-model.md
+33-21Lines changed: 33 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: 'In this tutorial, you will train a machine learning model using Az
4
4
author: kgremban
5
5
manager: philmea
6
6
ms.author: kgremban
7
-
ms.date: 2/10/2020
7
+
ms.date: 3/23/2020
8
8
ms.topic: tutorial
9
9
ms.service: iot-edge
10
10
services: iot-edge
@@ -56,7 +56,9 @@ We will upload sample notebook files into a new Azure Notebooks project.
56
56
57
57
1. From the user page of your new account, select **My Projects** from the top menu bar.
58
58
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**.
60
62
61
63
1. Leave **Public** and **README** unchecked as there is no need for the project to be public or to have a readme.
62
64
@@ -68,6 +70,8 @@ We will upload sample notebook files into a new Azure Notebooks project.
68
70
69
71
1. Navigate to **C:\source\IoTEdgeAndMlSample\AzureNotebooks**. Select all the files in the list and click **Open**.
70
72
73
+
1. Check the **I trust the content of these files** box.
74
+
71
75
1. Select **Upload** to begin uploading and then select **Done** once the process is complete.
72
76
73
77
### Azure notebook files
@@ -90,7 +94,7 @@ Let's review the files you uploaded into your Azure Notebooks project. The activ
90
94
91
95
***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.
92
96
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.
94
98
95
99
***Utils.py:** Contains a set of Python utility functions for working with data. The first notebook contains a detailed explanation of the functions.
96
100
@@ -104,42 +108,40 @@ Now that the project is created, you can run the notebooks.
104
108
105
109

106
110
107
-
1. If prompted, choose the Python 3.6 Kernel from the dialog and select **Set Kernel**.
108
-
109
111
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**.
110
112
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
-

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.
116
114
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.
118
116
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.
120
118
121
119
> [!TIP]
122
120
> For consistent cell operations, avoid running the same notebook from multiple tabs in your browser.
123
121
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
+

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:
125
127
126
128

127
129
128
130
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.
129
131
130
132

131
133
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**.
133
135
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
+

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.
139
141
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**.
141
143
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.
143
145
144
146
### Verify success
145
147
@@ -155,11 +157,21 @@ To verify that the notebooks have completed successfully, verify that a few item
155
157
| ./aml_config/model_config.json | Configuration file that we will need to deploy the model in the **turbofanDemo** Machine Learning workspace in Azure. |
156
158
| myenv.yml| Provides information about the dependencies for the deployed Machine Learning model.|
157
159
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.
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.
0 commit comments