Skip to content

Commit e946e54

Browse files
Editorial updates
1 parent 9b809fc commit e946e54

File tree

3 files changed

+30
-29
lines changed

3 files changed

+30
-29
lines changed

content/learning-paths/servers-and-cloud-computing/gh-runners/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ learning_objectives:
1717
prerequisites:
1818
- A GitHub account with access to Arm-hosted GitHub runners.
1919
- A Docker Hub account for storing container images.
20-
- Familiarity with ML and continuous integration and deployment (CI/CD) concepts.
20+
- Familiarity with the concepts of ML and continuous integration and deployment (CI/CD).
2121

2222
author_primary: Pareena Verma, Annie Tallund
2323

content/learning-paths/servers-and-cloud-computing/gh-runners/background.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ layout: learningpathall
1010

1111
In this Learning Path, you will learn how to automate an MLOps workflow using Arm-hosted GitHub runners and GitHub Actions.
1212

13-
You will learn how to do the following tasks:
13+
You will perform the following tasks:
1414
- Train and test a neural network model with PyTorch.
1515
- Compare the model inference time using two different PyTorch backends.
1616
- Containerize the model and save it to DockerHub.
1717
- Deploy the container image and use API calls to access the model.
1818

1919
## GitHub Actions
2020

21-
GitHub Actions is a platform that automates software development workflows, including continuous integration and continuous delivery. Every repository on GitHub has an `Actions` tab as shown below:
21+
GitHub Actions is a platform that automates software development workflows, which includes Continuous Integration and Continuous Delivery (CI/CD).
22+
23+
Every repository on GitHub has an **Actions** tab as shown below:
2224

2325
![#actions-gui](images/actions-gui.png)
2426

@@ -32,11 +34,11 @@ The machine running workflows is called a _runner_.
3234

3335
## Arm-hosted GitHub runners
3436

35-
Hosted GitHub runners are provided by GitHub so you don't need to set up and manage cloud infrastructure. Arm-hosted GitHub runners use the Arm architecture so you can build and test software without cross-compiling or instruction emulation.
37+
Hosted GitHub runners are provided by GitHub, so you do not need to set up and manage cloud infrastructure. Arm-hosted GitHub runners use the Arm architecture so you can build and test software without the necessity for cross-compiling or instruction emulation.
3638

3739
Arm-hosted GitHub runners enable you to optimize your workflows, reduce cost, and improve energy consumption.
3840

39-
Additionally, the Arm-hosted runners are preloaded with essential tools, making it easier for you to develop and test your applications.
41+
Additionally, the Arm-hosted runners are preloaded with essential tools, making it easier for to develop and test your applications.
4042

4143
Arm-hosted runners are available for Linux and Windows. This Learning Path uses Linux.
4244

@@ -66,22 +68,22 @@ jobs:
6668
6769
## Machine Learning Operations (MLOps)
6870
69-
Machine learning use-cases have a need for reliable workflows to maintain performance and quality.
71+
Machine learning use cases require reliable workflows to maintain both performance and quality of output.
7072
71-
There are many tasks that can be automated in the ML lifecycle.
72-
- Model training and re-training
73-
- Model performance analysis
74-
- Data storage and processing
75-
- Model deployment
73+
There are tasks that can be automated in the ML lifecycle, such as:
74+
- Model training and retraining.
75+
- Model performance analysis.
76+
- Data storage and processing.
77+
- Model deployment.
7678
77-
Developer Operations (DevOps) refers to good practices for collaboration and automation, including CI/CD. The domain-specific needs for ML, combined with DevOps knowledge, creates the new term MLOps.
79+
Developer Operations (DevOps) refers to good practices for collaboration and automation, including CI/CD. MLOps describes the area of practice where the ML application development intersects with ML system deployment and operations.
7880
7981
## German Traffic Sign Recognition Benchmark (GTSRB)
8082
8183
This Learning Path explains how to train and test a PyTorch model to perform traffic sign recognition.
8284
8385
You will learn how to use the GTSRB dataset to train the model. The dataset is free to use under the [Creative Commons](https://creativecommons.org/publicdomain/zero/1.0/) license. It contains thousands of images of traffic signs found in Germany. It has become a well-known resource to showcase ML applications.
8486
85-
The GTSRB dataset is also good for comparing performance and accuracy of different models and to compare and contrast different PyTorch backends.
87+
The GTSRB dataset is also effective for comparing the performance and accuracy of both different models, and different PyTorch backends.
8688
8789
Continue to the next section to learn how to set up an end-to-end MLOps workflow using Arm-hosted GitHub runners.

content/learning-paths/servers-and-cloud-computing/gh-runners/train-test.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,29 @@ weight: 3
66
layout: learningpathall
77
---
88

9-
In this section, you will fork the example GitHub repository containing the project code and inspect the Python code for training and testing a neural network model.
10-
119
## Fork the example repository
1210

13-
Get started by forking the example repository.
11+
In this section, you will fork the example GitHub repository containing the project code.
1412

15-
In a web browser, navigate to the repository at:
13+
Get started by forking the example repository. In a web browser, navigate to the repository at:
1614

1715
```bash
1816
https://github.com/Arm-Labs/gh_armrunner_mlops_gtsrb
1917
```
20-
21-
Fork the repository, using the `Fork` button:
18+
Fork the repository, using the **Fork** button:
2219

2320
![#fork](/images/fork.png)
2421

2522
Create a fork within a GitHub Organization or Team where you have access to Arm-hosted GitHub runners.
2623

2724
{{% notice Note %}}
28-
If a repository with the same name `gh_armrunner_mlops_gtsrb` already exists in your Organization or Team you modify the repository name to make it unique.
25+
If a repository with the same name `gh_armrunner_mlops_gtsrb` already exists in your Organization or Team, you can modify the repository name to make it unique.
2926
{{% /notice %}}
3027

3128
## Learn about model training and testing
3229

30+
In this section, you will inspect the Python code for training and testing a neural network model.
31+
3332
Explore the repository using a browser to get familiar with code and the workflow files.
3433

3534
{{% notice Note %}}
@@ -42,15 +41,15 @@ The purpose is to provide an overview of the code used for training and testing
4241

4342
In the `scripts` directory, there is a Python script called `train_model.py`. This script loads the GTSRB dataset, defines a neural network, and trains the model on the dataset.
4443

45-
#### Data pre-processing
44+
#### Data preprocessing
4645

4746
The first section loads the GTSRB dataset to prepare it for training. The GTSRB dataset is built into `torchvision`, which makes loading easier.
4847

49-
The transformations used when loading data are part of the pre-processing step, which makes the data uniform and ready to run through the extensive math operations of the ML model.
48+
The transformations used when loading data are part of the preprocessing step, which makes the data uniform and ready to run through the extensive math operations of the ML model.
5049

51-
In accordance with common machine learning practices, data is separated into training and testing data to avoid over-fitting the neural network.
50+
In accordance with common machine learning practices, data is separated into training and testing data to avoid overfitting the neural network.
5251

53-
Here is the code to load the dataset:
52+
Use this code to load the dataset:
5453

5554
```python
5655
transform = transforms.Compose([
@@ -67,9 +66,9 @@ train_loader = DataLoader(train_set, batch_size=64, shuffle=True)
6766

6867
The next step is to define a class for the model, listing the layers used.
6968

70-
The model defines the forward-pass function used at training time to update the weights. Additionally, the loss function and optimizer for the model are defined.
69+
The model defines the forward pass function used at training time to update the weights. Additionally, the loss function and optimizer for the model are defined.
7170

72-
Here is the code defining the model:
71+
Use this code that defines the model:
7372

7473
```python
7574
class TrafficSignNet(nn.Module):
@@ -101,7 +100,7 @@ A training loop performs the actual training.
101100

102101
The number of epochs is arbitrarily set to 10 for this example. When the training is finished, the model weights are saved to a `.pth` file.
103102

104-
Here is the code for the training loop:
103+
Use this code for the training loop:
105104

106105
```python
107106
num_epochs = 10
@@ -144,7 +143,7 @@ Testing is done by loading the model that was saved after training and preparing
144143

145144
As in training, transformations are used to load the test data from the GTSRB dataset.
146145

147-
Here is the code to load the model and the test data:
146+
Use this code to load the model and the test data:
148147

149148
```python
150149
model_path = args.model if args.model else './models/traffic_sign_net.pth'
@@ -167,7 +166,7 @@ test_loader = DataLoader(test_set, batch_size=64, shuffle=False)
167166

168167
The testing loop passes each batch of test data through the model and compares predictions to the actual labels to calculate accuracy.
169168

170-
The accuracy is calculated as a percentage of correctly classified images. Both the accuracy and PyTorch profiler report is printed at the end of the script.
169+
The accuracy is calculated as a percentage of correctly classified images. Both the accuracy and PyTorch profiler reports are printed at the end of the script.
171170

172171
Here is the testing loop with profiling:
173172

0 commit comments

Comments
 (0)