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: docs/user_guides/mlops/registry/model_evaluation_images.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ description: Documentation on how to attach model evaluation images to a model.
6
6
7
7
## Introduction
8
8
9
-
In this guide, you will learn how to attach ==model evaluation images== to a model. Model evaluation images contain **confusion matrices**, **ROC curves** or other graphs that help visualizing model evaluation metrics. By attaching model evaluation images to your model version, other users can better understand the experiment results obtained during model training.
9
+
In this guide, you will learn how to attach ==model evaluation images== to a model. Model evaluation images are images that visually describe model performance metrics. For example, **confusion matrices**, **ROC curves**, **model bias tests**, and **training loss curves** are examples of common model evaluation images. By attaching model evaluation images to your versioned model, other users can better understand the model performance and evaluation metrics.
10
10
11
11
## Code
12
12
@@ -21,9 +21,9 @@ project = hopsworks.login()
21
21
mr = project.get_model_registry()
22
22
```
23
23
24
-
### Step 2: Generate model evaluation figures
24
+
### Step 2: Generate model evaluation images
25
25
26
-
Generate a figure that visualizes a model metric.
26
+
Generate an image that visualizes model performance and evaluation metrics
27
27
28
28
```python
29
29
import seaborn
@@ -53,15 +53,15 @@ fig = heatmap.get_figure()
53
53
fig.show()
54
54
```
55
55
56
-
### Step 3: Save the figures as images inside the model directory
56
+
### Step 3: Save the figure to a file inside the model directory
57
57
58
-
Save the figure to an image file, and place it in a directory with name ´images´ inside the model directory to be exported.
58
+
Save the figure to a file with a common filename extension (for example, .png or .jpeg), and place it in a directory called `images` - a subdirectory of the model directory that is registered to Hopsworks.
59
59
60
60
```python
61
61
# Specify the directory name for saving the model and related artifacts
62
62
model_dir ="./model"
63
63
64
-
# Create a directory with name 'images' for saving the model evaluation images
64
+
# Create a subdirectory of model_dir called 'images' for saving the model evaluation images
65
65
model_images_dir = model_dir +"/images"
66
66
ifnot os.path.exists(model_images_dir):
67
67
os.mkdir(model_images_dir)
@@ -76,4 +76,4 @@ py_model.save("./model")
76
76
77
77
## Conclusion
78
78
79
-
In this guide you learned how to attach model evaluation images to a model, helping better understand the experiment results obtained during model training.
79
+
In this guide you learned how to attach model evaluation images to a model, visually communicating the model performance and evaluation metrics in the model registry.
0 commit comments