Running a Model on the Edge Tutorial¶
About 25 minutes
In this tutorial, we will run a machine learning model in Arundo Edge. This model will calculate the total power output of two wind turbines.
The tutorial is divided into the following sections:
- Learning Objectives - things you will know how to do after completing the tutorial.
- Prerequisites - requirements to meet before you get started.
- Setup - set up necessary before you get started.
- Instructions - instructions on how to complete the tutorial.
- Finishing Up - challenges and further reading for after the tutorial.
After completing this tutorial, you will know how to:
- Create simulators that stream sample data
- Build machine learning models
- Deploy machine learning models to Arundo Edge
- View the output of machine learning models
This tutorial uses a machine learning model built in Arundo Enterprise. If you haven't worked with machine learning models in Arundo Enterprise before, take a look at the Model Workspaces and Models articles before you start this tutorial.
Before you start the tutorial, you must do the following:
- Install Arundo Edge
- Add a Cloud interface for Arundo Fabric
- Install Arundo Composer
- Install the latest version of Docker Desktop/CE (Windows / macOS / Linux)
- Start Docker and keep it running
Now let's get started...
1. Set Up a Simulator¶
The first step is to set up a simulator to stream sample turbine data.
a) Download the Sample Data¶
Download the following sample data file.
Save the file on your local device.
The simulator will stream data from this file.
b) Add a Sequence Interface¶
Add a Sequence interface in Arundo Edge:
The Sequence interface will stream the sample data from Arundo Edge to Arundo Fabric on repeat.
- Double-click the Arundo Edge shortcut on the desktop.
- Log in as normal.
- Select Interfaces | + Add new.
- Select Sequence.
- In Name, enter "Turbine Simulator".
- Click Add interface.
c) Upload the Sample Data¶
Upload the sample data file to Sequence interface by clicking Upload CSV (highlighted below).
Then click the upload box and select the sample data file. The sample data now displays on the screen as follows:
2. Publish the Model¶
The next step is to build and publish a machine learning model into Arundo Fabric.
a) Build a Model Workspace¶
Access the Arundo Composer CLI and browse to the local directory where you want to store the model workspace. Then run the following command:
Press Y and Enter to add a new folder. The following message displays once the workspace is built:
1 2 3 4 5
b) Update the config.yaml¶
Next, open a source code editor and open the contents of the model workspace directory. Open the config.yaml file, then set the model name and version number as follows:
1 2 3
Save your changes once you are finished.
c) Update the app.py¶
Open the app.py file, delete the code on lines 6-13, and remove the blank space on line 1. This should leave the following:
Enter the following code on lines 5-14:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Finally, save your changes and close the config.yaml and app.py files.
d) Publish the Model¶
Access the Arundo Composer CLI and browse to the model workspace directory. Then run the following command:
The following message displays:
Press Y and Enter to continue. The publishing begins and the following message displays once the model is published successfully:
1 2 3 4 5 6 7 8 9 10
3. Deploy the Model¶
The next step is to deploy the model from Arundo Fabric to Arundo Edge. First, access Arundo Edge, open the System menu and select Upload Configuration to Fabric.
Next, access Arundo Fabric and select Models on the Navigation bar. Then locate the model in the list and click Deploy to Edge next to the model.
Select your edge device in the Edge Agents list.
Under Endpoint Configuration, select the following inputs and outputs for the model:
Finally, click Deploy. A message displays at the top of the screen once the model is deployed successfully.
4. View Model Output¶
The final step is to view the calculated output for the model. To do this, complete the following:
- Select Viewer on the sidebar.
- Open the Graph tab.
- Select "Sent to Cloud" in Filter.
- Select Auto refresh.
The output displays on the Total_Output panel under Models.
Congratulations! You've now deployed and ran a machine learning model on the edge. We hope you now understand how to run models on the edge to enhance your data analytics.
Want to expand your knowledge further? Try the following:
Deploy your own machine learning models to Arundo Edge to generate output for analysis.
We have used a number of features in this tutorial. Read the following articles to learn more about them:
|Arundo Fabric||Arundo Fabric Overview|
|Arundo Composer||Arundo Composer Overview|
|Model Workspaces||Model Workspaces|
Download the files used in this tutorial.