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: content/learning-paths/servers-and-cloud-computing/mlflow-axion/_index.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ draft: true
5
5
cascade:
6
6
draft: true
7
7
8
+
description: Install MLflow on a Google Cloud C4A Axion Arm VM running SUSE Linux, track experiments with MLflow Tracking, version models using the Model Registry, and deploy a model as a REST API.
9
+
8
10
minutes_to_complete: 30
9
11
10
12
who_is_this_for: This is an introductory topic for DevOps engineers, ML engineers, and software developers who want to manage the machine learning lifecycle using MLflow on SUSE Linux Enterprise Server (SLES) Arm64, track experiments, version models, and deploy models as scalable APIs.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mlflow-axion/firewall.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,15 @@ For help with GCP setup, see the Learning Path [Getting started with Google Clou
16
16
17
17
Navigate to the [Google Cloud Console](https://console.cloud.google.com/), go to **VPC Network > Firewall**, and select **Create firewall rule**.
18
18
19
-

19
+

20
20
21
-
Next, create the firewall rule that exposes required ports for Ray.
21
+
Next, create the firewall rule that exposes the ports required for MLflow.
22
22
23
23
Set the **Name** of the new rule to "allow-mlflow-ports". Select the network that you intend to bind to your VM.
24
24
25
-
Set **Direction of traffic** to "Ingress". Set **Allow on match** to "Allow" and **Targets** to "Specified target tags". Enter "allow-ray-ports" in the **Target tags** text field. Set **Source IPv4 ranges** to "0.0.0.0/0".
25
+
Set **Direction of traffic** to "Ingress". Set **Allow on match** to "Allow" and **Targets** to "All instances in the network". Set **Source IPv4 ranges** to "0.0.0.0/0".
26
26
27
-

27
+

28
28
29
29
Finally, select **Specified protocols and ports** under the **Protocols and ports** section. Select the **TCP** checkbox and enter:
30
30
@@ -37,7 +37,7 @@ Finally, select **Specified protocols and ports** under the **Protocols and port
37
37
38
38
Then select **Create**.
39
39
40
-

40
+

41
41
42
42
## What you've accomplished and what's next
43
43
@@ -46,4 +46,4 @@ In this section, you:
46
46
* Created a firewall rule to expose MLflow UI and model serving API
47
47
* Enabled external access to monitor experiments and access deployed models
48
48
49
-
Next, you'll run MLflow workloads and serve models on your Arm-based virtual machine.
49
+
Next, you'll create a C4A Arm VM and attach it to this firewall rule.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mlflow-axion/instance.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Create a Google Axion C4A Arm virtual machine on GCP
2
+
title: Create a Google Axion C4A Arm virtual machine on GCP
3
3
weight: 4
4
4
5
5
### FIXED, DO NOT MODIFY
@@ -8,7 +8,7 @@ layout: learningpathall
8
8
9
9
## Provision a Google Axion C4A Arm VM
10
10
11
-
In this section, you'll create a Google Axion C4A Arm-based virtual machine on Google Cloud Platform. You'll use the `c4a-standard-4` machine type, which provides 4 vCPUs and 16 GB of memory. This VM will host your Ray application.
11
+
In this section, you'll create a Google Axion C4A Arm-based virtual machine on Google Cloud Platform. You'll use the `c4a-standard-4` machine type, which provides 4 vCPUs and 16 GB of memory. This VM will host your MLflow tracking server and model serving API.
12
12
13
13
{{% notice Note %}}
14
14
For help with GCP setup, see the Learning Path [Getting started with Google Cloud Platform](/learning-paths/servers-and-cloud-computing/csp/google/).
@@ -32,11 +32,14 @@ To create a virtual machine based on the C4A instance type:
32
32
- For the license type, choose **Pay as you go**.
33
33
- Increase **Size (GB)** from **10** to **100** to allocate sufficient disk space.
34
34
- Select **Choose** to apply the changes.
35
+
- Expand **Advanced options** and select **Networking**.
36
+
- Under **Network tags**, enter `allow-mlflow-ports`.
37
+
- This links the VM to the firewall rule you created in the previous step, ensuring inbound access to ports 5000 (MLflow UI) and 6000 (model serving API).
35
38
- Select **Create** to launch the virtual machine.
36
39
37
40
After the instance starts, select **SSH** next to the VM in the instance list to open a browser-based terminal session.
38
41
39
-

42
+

40
43
41
44
A new browser window opens with a terminal connected to your VM.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/mlflow-axion/model-registry_deployment.md
+49-30Lines changed: 49 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,12 @@ layout: learningpathall
11
11
This section covers model versioning, alias assignment, and serving the model as an API.
12
12
13
13
14
-
## Terminal usage (Important)
14
+
## Terminal usage
15
15
16
-
We continue using the same terminals:
16
+
This section continues with the same two terminals from the previous step:
17
17
18
-
-**Terminal A** → Run scripts and test API
19
-
-**Terminal B** → MLflow server (already running)
20
-
-**Optional Terminal C** → Model serving (if you want a separate terminal)
21
-
22
-
If you want simplicity, you can use only **Terminal A + B**
18
+
-**Terminal A** → Run scripts, start model serving, and test the API
19
+
-**Terminal B** → MLflow tracking server (keep this running)
23
20
24
21
## Set tracking URI
25
22
@@ -29,8 +26,7 @@ In **Terminal A**, run:
29
26
export MLFLOW_TRACKING_URI=http://127.0.0.1:5000
30
27
```
31
28
32
-
- This tells MLflow to use your running server.
33
-
- Without this, MLflow will not find your models.
29
+
This tells the MLflow client which tracking server to connect to. Without it, the client defaults to a local directory and won't find the models registered on your server.
34
30
35
31
## Create alias script
36
32
@@ -67,54 +63,64 @@ EOF
67
63
68
64
## Assign production model
69
65
70
-
**Run the script:**
66
+
Run the script:
71
67
72
68
```bash
73
69
python set_prod.py
74
70
```
71
+
The output is similar to:
75
72
73
+
```output
74
+
Production version: 1
75
+
```
76
76
**What this does:**
77
77
78
-
- checks all model versions.
79
-
- finds the best accuracy.
80
-
- marks it as production.
78
+
This script queries all registered versions of `iris-model`, finds the version with the highest `accuracy` metric, and assigns it the `production` alias. The alias is how `mlflow models serve` identifies which model version to load.
81
79
82
80
## Serve model
83
81
84
-
Now we deploy the model as an API.
82
+
With Terminal B still running the MLflow tracking server, use Terminal A to start the model serving API. `mlflow models serve` loads the aliased model from the registry and starts a uvicorn HTTP server that exposes a `/invocations` endpoint for inference.
85
83
86
-
You can run this in **Terminal A** or open **Terminal C**.
84
+
In **Terminal A**, navigate to the project directory and set the tracking URI:
87
85
88
86
```bash
89
87
cd~/mlflow-learning-path
90
-
source mlflow-env/bin/activate
91
-
```
92
-
93
-
```bash
94
88
export MLFLOW_TRACKING_URI=http://127.0.0.1:5000
95
89
```
96
90
91
+
Start the model server in the background using `&` so Terminal A stays free for testing:
92
+
97
93
```bash
98
94
mlflow models serve \
99
95
-m "models:/iris-model@production" \
100
96
-p 6000 \
101
-
--no-conda
97
+
--no-conda&
102
98
```
103
99
104
-
## View registered models
100
+
-`-m "models:/iris-model@production"` — loads the model version with the `production` alias from the registry
101
+
-`-p 6000` — serves on port 6000
102
+
-`--no-conda` — uses the active virtual environment instead of creating a new conda environment
103
+
104
+
The output is similar to:
105
105
106
-
Go to:
106
+
```output
107
+
2026/05/04 13:42:12 INFO mlflow.models.flavor_backend_registry: Selected backend for flavor 'python_function'
INFO: Uvicorn running on http://127.0.0.1:6000 (Press CTRL+C to quit)
113
+
```
114
+
## View registered models
107
115
108
-
- Model training → Models
116
+
In the MLflow UI at `http://<VM-IP>:5000`, select the **Models** tab. You should see the `iris-model` entry with multiple registered versions and the `production` alias assigned to the best-performing one.
109
117
110
-

111
118
112
-
You should see:
119
+

113
120
114
-
- multiple versions (v1, v2, v3…)
115
-
- one marked as production
121
+
## Test the API from Terminal A
116
122
117
-
## Test inference from the Free Terminal ( A or C)
123
+
The `/invocations` endpoint accepts data in the `dataframe_records` format — a list of JSON objects where each object represents one row, with column names as keys. The model returns a prediction for each row. Send a single Iris flower measurement to test inference:
118
124
119
125
```bash
120
126
curl -X POST http://127.0.0.1:6000/invocations \
@@ -128,14 +134,18 @@ curl -X POST http://127.0.0.1:6000/invocations \
128
134
"petal width (cm)": 0.2
129
135
}
130
136
]
137
+
}'
131
138
```
132
139
133
-
You will get a prediction output like:
140
+
The expected output is:
134
141
135
142
```output
136
-
[0]
143
+
INFO: 127.0.0.1:41158 - "POST /invocations HTTP/1.1" 200 OK
144
+
{"predictions": [0]}
137
145
```
138
146
147
+
The prediction `0` corresponds to Iris setosa, which is the correct class for these measurements. The Iris dataset has three classes: `0` = setosa, `1` = versicolor, `2` = virginica.
148
+
139
149
## What you've learned
140
150
141
151
You have successfully:
@@ -144,3 +154,12 @@ You have successfully:
144
154
- Assigned a production alias
145
155
- Deployed the model as an API
146
156
- Performed inference using curl
157
+
158
+
## Summary
159
+
160
+
You have completed the full MLflow lifecycle on a Google Cloud C4A Axion Arm VM running SUSE Linux.
161
+
162
+
Starting from a freshly provisioned Arm-based VM, you installed MLflow and its dependencies in an isolated Python virtual environment, then started the MLflow tracking server backed by a local SQLite database. You trained a logistic regression model on the Iris dataset across three hyperparameter configurations, with each run automatically logged to the MLflow Tracking UI and each model version registered in the Model Registry.
163
+
164
+
In this final section, you used the Model Registry to select the best-performing version by accuracy, assigned it a `production` alias, and served it as a REST API using `mlflow models serve`. You then validated the end-to-end workflow by sending a live inference request using curl and interpreting the prediction.
0 commit comments