Skip to content

Commit 4a7f5dd

Browse files
stevsmitSteven Smith
and
Steven Smith
authored
Adds model card feature procedure (#1240)
Co-authored-by: Steven Smith <[email protected]>
1 parent 767d94f commit 4a7f5dd

10 files changed

+110
-27
lines changed

images/modelcard.png

53 KB
Loading

modules/config-fields-modelcard-rendering.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ The following configuration fields have been added to support model card renderi
66
|===
77
| Field | Type | Description
88

9-
|*FEATURE_UI_MODELCARD* |Boolean | Enables *Modelcard* image tab in UI. Defaults to `true`.
10-
|*UI_MODELCARD_ARTIFACT_TYPE* | String | Defines the modelcard artifact type.
9+
|*FEATURE_UI_MODELCARD* |Boolean | Enables *Model Card* image tab in UI. Defaults to `true`.
10+
|*UI_MODELCARD_ARTIFACT_TYPE* | String | Defines the model card artifact type.
1111
|*UI_MODELCARD_ANNOTATION* |Object | This optional field defines the layer annotation of the model card stored in an OCI image.
1212
|*UI_MODELCARD_LAYER_ANNOTATION* |Object | This optional field defines the layer annotation of the model card stored in an OCI image.
1313
|===
@@ -22,7 +22,7 @@ UI_MODELCARD_ANNOTATION: <3>
2222
UI_MODELCARD_LAYER_ANNOTATION: <4>
2323
org.opencontainers.image.title: README.md
2424
----
25-
<1> Enables the ModelCard image tab in the UI.
25+
<1> Enables the *Model Card* image tab in the UI.
2626
<2> Defines the model card artifact type. In this example, the artifact type is `application/x-mlmodel`.
2727
<3> Optional. If an image does not have an `artifactType` defined, this field is checked at the manifest level. If a matching annotation is found, the system then searches for a layer with an annotation matching `UI_MODELCARD_LAYER_ANNOTATION`.
2828
<4> Optional. If an image has an `artifactType` defined and multiple layers, this field is used to locate the specific layer containing the model card.

modules/config-updates-314.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ The following configuration fields have been added to support model card renderi
1212
|===
1313
| Field | Type | Description
1414

15-
|*FEATURE_UI_MODELCARD* |Boolean | Enables *Modelcard* image tab in UI. Defaults to `true`.
16-
|*UI_MODELCARD_ARTIFACT_TYPE* | String | Defines the modelcard artifact type.
15+
|*FEATURE_UI_MODELCARD* |Boolean | Enables *Model card* image tab in UI. Defaults to `true`.
16+
|*UI_MODELCARD_ARTIFACT_TYPE* | String | Defines the model card artifact type.
1717
|*UI_MODELCARD_ANNOTATION* |Object | This optional field defines the layer annotation of the model card stored in an OCI image.
1818
|*UI_MODELCARD_LAYER_ANNOTATION* |Object | This optional field defines the layer annotation of the model card stored in an OCI image.
1919
|===
@@ -28,7 +28,7 @@ UI_MODELCARD_ANNOTATION: <3>
2828
UI_MODELCARD_LAYER_ANNOTATION: <4>
2929
org.opencontainers.image.title: README.md
3030
----
31-
<1> Enables the ModelCard image tab in the UI.
31+
<1> Enables the *Model Card* image tab in the UI.
3232
<2> Defines the model card artifact type. In this example, the artifact type is `application/x-mlmodel`.
3333
<3> Optional. If an image does not have an `artifactType` defined, this field is checked at the manifest level. If a matching annotation is found, the system then searches for a layer with an annotation matching `UI_MODELCARD_LAYER_ANNOTATION`.
3434
<4> Optional. If an image has an `artifactType` defined and multiple layers, this field is used to locate the specific layer containing the model card.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
2+
// module included in the following assemblies:
3+
4+
// * use_quay/master.adoc
5+
// * quay_io/master.adoc
6+
7+
:_content-type: CONCEPT
8+
9+
[id="creating-an-image-repository-via-skopeo-copy"]
10+
= Creating a repository by using Skopeo
11+
12+
In some cases, the `podman` CLI tool is unable to pull certain artifact types, for example, `application/x-mlmodel`. Attempting to use `podman pull` with this artifact type results in the following error:
13+
14+
[source,terminal]
15+
----
16+
Error: parsing image configuration: unsupported image-specific operation on artifact with type "application/x-mlmodel"
17+
----
18+
19+
As an alternative, you can use `skopeo copy` to copy an artifact from one location to your {productname} repository.
20+
21+
.Prerequisites
22+
23+
* You have installed the `skopeo` CLI.
24+
* You have logged in to a source registry (in this example, `\registry.redhat.io`) and have a valid authentication file (`~/.docker/config.json`). Alternatively, you can provide credentials by using the `--src-username` and `--src-password` parameters when running a command with the `skopeo` CLI.
25+
* You have logged in to your {productname} repository.
26+
27+
.Procedure
28+
29+
* Use the `skopeo copy` command on an artifact to copy the artifact to your {productname} repository. For example:
30+
+
31+
[source,terminal]
32+
----
33+
$ sudo skopeo copy --dest-tls-verify=false --all \ <1> <2>
34+
--src-username <source_username> --src-password <source_password> \ <3>
35+
--src-authfile ~/.docker/config.json \ <4>
36+
--dest-username <username> --dest-password <password> \ <5>
37+
docker://registry.redhat.io/rhelai1/granite-8b-code-instruct:1.4-1739210683 \ <6>
38+
docker://quay-server.example.com/<namespace>/granite-8b-code-instruct:latest <7>
39+
----
40+
<1> Optional. `--dest-tls-verify=false` disables SSL/TLS verification for the destination registry.
41+
<2> Optional. The `--all` flag optionally copies all image manifests, including multi-architecture images.
42+
<3> Optional. If you are not logged into a registry, you can pass in the source registry credentials with these parameters.
43+
<4> Optional. The path to your Docker authentication file. Typically located at `~/.docker/config.json`.
44+
<5> Your {productname} registry username and password.
45+
<6> The source image or artifact from the Red{nbsp}Hat container registry. Ensure that you are logged in to the registry and that you can pull the image.
46+
<7> The URL of your {productname} repository appended with a namespace and the name of the image.
47+
+
48+
.Example output
49+
+
50+
[source,terminal]
51+
----
52+
Getting image source signatures
53+
Checking if image destination supports signatures
54+
Copying blob 9538fa2b8ad9 done |
55+
Copying blob 491ae95f59a2 done |
56+
Copying blob 01196d075d77 done |
57+
Copying blob e53a4633c992 done |
58+
Copying blob c266e9cfa731 done |
59+
Copying blob dae0e701d9b2 done |
60+
Copying blob 1e227a2c78d8 done |
61+
Copying blob 94ff9338861b done |
62+
Copying blob 2f2bba45146f done |
63+
Copying blob d3b4df07a0ce done |
64+
Copying blob f533a8dbb852 done |
65+
Copying config 44136fa355 done |
66+
Writing manifest to image destination
67+
Storing signatures
68+
----
69+
70+
.Next steps
71+
72+
* After you have pushed a machine learning artifact to your {productname} repository, you can link:https://docs.redhat.com/en/documentation/red_hat_quay/{producty}/html-single/use_red_hat_quay/index#viewing-and-modifying-tags[View tag information by using the UI] or link:https://docs.redhat.com/en/documentation/red_hat_quay/{producty}/html-single/use_red_hat_quay/index#viewing-model-card-information[View model card information by using the UI].

modules/proc_use-quay-create-repo.adoc

+6-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ ifeval::["{context}" == "quay-io"]
3535
There are two ways to create a repository in {quayio}: by pushing an image with the relevant `podman` command, or by using the {quayio} UI. You can also use the UI to delete a repository.
3636
endif::[]
3737
ifeval::["{context}" == "use-quay"]
38-
There are three ways to create a repository in {productname}: by pushing an image with the relevant `podman` command, by using the {productname} UI, or by using the {productname} API. Similarly, repositories can be deleted by using the UI or the proper API endpoint.
38+
There are multiple ways to create a repository in {productname}. The following options are available depending on your use case:
39+
40+
* You can push an image with the relevant `podman` or `docker` command.
41+
* You can use the {productname} UI.
42+
* You can use the {productname} API.
43+
* For OCI artifacts, for example, a large-language model (LLM) or machine learning application, you can use `skopeo` or `oras` to copy the artifact to your repository.
3944
endif::[]
4045
4146
ifeval::["{context}" == "quay-io"]

modules/rn_3_14_0.adoc

+15-12
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,24 @@ The following documentation changes have been made with the {productname} 3.14 r
2828
The following updates have been made to {productname}.
2929

3030
[id="model-card-rendering"]
31-
=== User-interface modelcard rendering
31+
=== Model card rendering on the v2 UI
3232

33-
With the release of {productname} 3.14, modelcard rendering has been introduced to the v2 UI for machine learning models. When a manifest has a certain annotation and a modelcard stored as its layer, a *ModelCard* tab is displayed on the tag's information page. The information provided on the *ModelCard* page provides users with comprehensive insights into each model, and can help enhance a user's understanding of models stored within your registry.
33+
With the release of {productname} 3.14, the v2 UI now renders model card information for machine learning models that include a model card. When a manifest has a certain annotation (for example, `application/x-mlmodel`) and a model card stored as a layer in the manifest, a *Model Card* tab is displayed on the tag's information page. The information on the *Model Card* page provides users with comprehensive insights into each model, and can help enhance a user's understanding of models stored within their registry.
3434

3535
[NOTE]
3636
====
37-
Modelcard rendering is only available on the {productname} v2 UI.
37+
The *Model Card* rendering page is only available on the {productname} v2 UI.
3838
====
3939

40-
For more information, see. . .
40+
To view model card information, {productname} users or administrators must push an artifact to a repository. The artifact must have have an accompanying model card. This information renders under *Repository* -> *<tag_name>* -> *Model Card*.
41+
42+
For more information, see link:https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/use_red_hat_quay/index#viewing-model-card-information[Viewing model card information by using the v2 UI].
4143

4244
[id="tag-expiration-enhancement"]
4345
=== Tag expiration enhancement
4446

4547
Previously, when configuring tag expiration for {productname}, the `yearly` option was unavailable on the {productname} v2 UI. With this update, users can now configure default tag expiration to occur yearly on the {productname} v2 UI. This can be set by using the {productname} UI or in your `config.yaml` file. For example:
46-
+
48+
4749
[source,yaml]
4850
----
4951
DEFAULT_TAG_EXPIRATION: 1y
@@ -54,7 +56,7 @@ TAG_EXPIRATION_OPTIONS:
5456
[id="new-quay-config-fields-314"]
5557
== {productname} configuration fields updates and changes
5658

57-
The following configuration fields have been added to {productname} {producty}.
59+
The following configuration fields have been added to {productname} 3.14.
5860

5961
[id="model-card-rendering-configuration-field"]
6062
=== Model card rendering configuration fields
@@ -70,19 +72,20 @@ The following configuration fields have been added for the model card rendering
7072
|*UI_MODELCARD_LAYER_ANNOTATION* |Object | This optional field defines the layer annotation of the model card stored in an OCI image.
7173
|===
7274

73-
To enable model card rendering on the {productname} v2 UI, you must set `FEATURE_UI_MODELCARD: true` and `UI_MODELCARD_ARTIFACT_TYPE` in your `config.yaml` file. For example:
75+
These configuration fields are enabled and set by default in your `config.yaml` file:
7476

7577
.Example model card YAML
7678
[source,yaml]
7779
----
78-
FEATURE_UI_MODELCARD: true <1>
79-
UI_MODELCARD_ARTIFACT_TYPE: application/x-mlmodel <2>
80-
UI_MODELCARD_ANNOTATION: <3>
80+
FEATURE_UI_MODELCARD: true
81+
UI_MODELCARD_ARTIFACT_TYPE: application/x-mlmodel
82+
UI_MODELCARD_ANNOTATION:
8183
org.opencontainers.image.description: "Model card metadata"
82-
UI_MODELCARD_LAYER_ANNOTATION: <4>
84+
UI_MODELCARD_LAYER_ANNOTATION:
8385
org.opencontainers.image.title: README.md
8486
----
85-
For more information about this feature, see. . .
87+
88+
For more information, see link:https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/use_red_hat_quay/index#viewing-model-card-information[Viewing model card information by using the v2 UI].
8689

8790
[id="ignore-unknown-mediatype-removal"]
8891
=== IGNORE_UNKNOWN_MEDIATYPES configuration field removal

modules/using-v2-ui.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ Use the following procedure to alter your organization settings using the v2 UI.
375375
[id="tag-overview-v2-ui"]
376376
=== Viewing image tag information using the v2 UI
377377

378-
Use the following procedure to view image tag information using the v2 UI.
378+
Use the following procedure to view image tag information by using the v2 UI.
379379

380380
.Procedure
381381

modules/viewing-and-modifying-tags.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
:_content-type: CONCEPT
1+
:_content-type: PROCEDURE
22
[id="viewing-and-modifying-tags"]
33
= Viewing image tag information by using the UI
44

55
Use the following procedure to view image tag information using the v2 UI.
66

77
.Prerequisites
88

9-
* You have pushed an image tag to a repository.
9+
* You have pushed an image tag to a repository.
1010
1111
.Procedure
1212

@@ -28,6 +28,6 @@ Use the following procedure to view image tag information using the v2 UI.
2828

2929
. Click *Security Report* to view the tag's vulnerabilities. You can expand an advisory column to open up CVE data.
3030

31-
. Click *Packages* to view the tag's packages.
31+
. Click *Packages* to view the tag's packages.
3232

3333
. Click the name of the repository to return to the *Tags* page.

modules/viewing-model-card-information.adoc

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
:_content-type: PROCEDURE
12
[id="viewing-model-card-information"]
23
= Viewing model card information by using the UI
34

4-
Model card information can be viewed on the v2 UI. Model cards are essentially markdown (`.md`) files with additional metadata that provide information about a machine learning application. To view model card information, a manifest must have an annotation that is defined in your `config.yaml` file (for example, `application/x-mlmodel`) and include a model card stored as a layer in the manifest. When these conditions are met, a *ModelCard* tab appears on the *Details* page of a tag.
5+
Model card information can be viewed on the v2 UI. Model cards are essentially markdown (`.md`) files with additional metadata that provide information about a machine learning application. To view model card information, a manifest must have an annotation that is defined in your `config.yaml` file (for example, `application/x-mlmodel`) and include a model card stored as a layer in the manifest. When these conditions are met, a *Model Card* tab appears on the *Details* page of a tag.
56

67
* You have pushed an artifact of that annotation type, and it includes a model card (`.md`) file.
78
@@ -19,7 +20,7 @@ UI_MODELCARD_ANNOTATION: <3>
1920
UI_MODELCARD_LAYER_ANNOTATION: <4>
2021
org.opencontainers.image.title: README.md
2122
----
22-
<1> Enables the ModelCard image tab in the UI.
23+
<1> Enables the Model Card image tab in the UI.
2324
<2> Defines the model card artifact type. In this example, the artifact type is `application/x-mlmodel`.
2425
<3> Optional. If an image does not have an `artifactType` defined, this field is checked at the manifest level. If a matching annotation is found, the system then searches for a layer with an annotation matching `UI_MODELCARD_LAYER_ANNOTATION`.
2526
<4> Optional. If an image has an `artifactType` defined and multiple layers, this field is used to locate the specific layer containing the model card.

use_quay/master.adoc

+4-2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ include::modules/org-delete-api.adoc[leveloffset=+2]
3838
include::modules/proc_use-quay-create-repo.adoc[leveloffset=+1]
3939
include::modules/creating-an-image-repository-via-the-ui.adoc[leveloffset=+2]
4040
include::modules/creating-an-image-repository-via-docker.adoc[leveloffset=+2]
41+
include::modules/creating-an-image-repository-via-skopeo-copy.adoc[leveloffset=+2]
4142
include::modules/creating-an-image-repository-via-the-api.adoc[leveloffset=+2]
4243
include::modules/deleting-an-image-repository-via-ui.adoc[leveloffset=+2]
4344
include::modules/deleting-an-image-repository-via-the-api.adoc[leveloffset=+2]
@@ -79,6 +80,7 @@ include::modules/adjust-access-user-repo-api.adoc[leveloffset=+2]
7980
//image tags overview
8081
include::modules/image-tags-overview.adoc[leveloffset=+1]
8182
include::modules/viewing-and-modifying-tags.adoc[leveloffset=+2]
83+
include::modules/viewing-model-card-information.adoc[leveloffset=+3]
8284
include::modules/viewing-tags-api.adoc[leveloffset=+2]
8385
include::modules/adding-a-new-tag-to-image.adoc[leveloffset=+2]
8486
include::modules/adding-a-new-tag-to-image-api.adoc[leveloffset=+2]
@@ -114,7 +116,7 @@ include::modules/creating-notifications-api.adoc[leveloffset=+2]
114116
include::modules/repository-events.adoc[leveloffset=+2]
115117
116118
//docker files
117-
include::modules/proc_use-quay-build-workers-dockerfiles.adoc[leveloffset=+1]
119+
//include::modules/proc_use-quay-build-workers-dockerfiles.adoc[leveloffset=+1]
118120
//include::modules/proc_use-quay-build-dockerfiles.adoc[leveloffset=+1]
119121
120122
//custom trigger
@@ -145,7 +147,7 @@ include::modules/proxy-cache-procedure.adoc[leveloffset=+2]
145147
include::modules/proxy-cache-leveraging-storage-quota-limits.adoc[leveloffset=+2]
146148
147149
// Virtual builders
148-
include::modules/build-enhancements.adoc[leveloffset=+1]
150+
//include::modules/build-enhancements.adoc[leveloffset=+1]
149151
//include::modules/build-enhanced-arch.adoc[leveloffset=+2]
150152
//include::modules/build-limitations.adoc[leveloffset=+2]
151153
//include::modules/builders-virtual-environment.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)