Skip to content

Commit e8b03c0

Browse files
authored
Merge pull request #60 from stac-extensions/improve-asset-roles-desc
2 parents 70b0af5 + e8db76b commit e8b03c0

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased](https://github.com/stac-extensions/mlm/tree/main)
99

1010
### Added
11+
- Add better descriptions about required and recommended *MLM Asset Roles* and their implications
12+
(fixes [#54](https://github.com/stac-extensions/mlm/issues/54)).
1113
- Add explicit check of `value_scaling` sub-fields `minimum`, `maximum`, `mean`, `stddev`, etc. for
1214
corresponding `type` values `min-max` and `z-score` that depend on it.
1315
- Allow different `value_scaling` operations per band/channel/dimension as needed by the model.

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,21 @@ names for nesting the Assets in order to improve their quick identification, alt
595595
left up to user preference. However, the MLM Asset definitions **MUST** include the
596596
appropriate [MLM Asset Roles](#mlm-asset-roles) to ensure their discovery.
597597

598+
A valid STAC MLM Item definition requires at least one Asset with the `mlm:model` role, as well as,
599+
an accompanying `mlm:artifact_type` property that describes how to employ it.
600+
An Asset described with this role is considered the "*main*" [Model Asset](#model-asset) being described by
601+
the STAC Item definition. Typically, there will be only one asset containing the `mlm:model` role.
602+
However, multiple Assets employing the `mlm:model` role are permitted to provide alternate interfaces of the same model
603+
(e.g.: using different frameworks or compilations), but those assets should have exactly the same model interfaces
604+
(i.e.: identical `mlm:input`, `mlm:output`, etc.). In such case, the `mlm:artifact_type` property should be used to
605+
distinguish them.
606+
607+
Additional definitions such as the [Source Code Asset](#source-code-asset) and the [Container Asset](#container-asset)
608+
are considered "*side-car*" Assets that help understand how to employ the model, such as through the reference training
609+
script that produced the model or a preconfigured inference runtime environment. These additional Assets are optional,
610+
but it is *STRONGLY RECOMMENDED* to provide them in order to help correct adoption and use of the described model
611+
by users.
612+
598613
[stac-asset]: https://github.com/radiantearth/stac-spec/blob/master/collection-spec/collection-spec.md#asset-object
599614

600615
### MLM Asset Roles
@@ -617,8 +632,8 @@ In order to provide more context, the following roles are also recommended were
617632
| mlm:training-runtime (*) | `runtime` | Describes an Asset that provides runtime reference to perform model training. |
618633
| mlm:checkpoint (*) | `weights`, `checkpoint` | Describes an Asset that provides a model checkpoint with embedded model configurations. |
619634
| mlm:weights | `weights`, `checkpoint` | Describes an Asset that provides a model weights (typically some Tensor representation). |
620-
| mlm:model | `model` | Required role for [Model Asset](#model-asset). |
621-
| mlm:source_code | `code` | Required role for [Model Asset](#source-code-asset). |
635+
| mlm:model | `model` | **REQUIRED** Role for [Model Asset](#model-asset). |
636+
| mlm:source_code | `code` | **RECOMMENDED** Role for [Source Code Asset](#source-code-asset). |
622637

623638
<!-- lint disable no-undefined-references -->
624639

@@ -642,7 +657,7 @@ In order to provide more context, the following roles are also recommended were
642657

643658
Recommended Asset `roles` include `mlm:weights` or `mlm:checkpoint` for model weights that need to be loaded by a
644659
model definition and `mlm:compiled` for models that can be loaded directly without an intermediate model definition.
645-
In each case, the `mlm:model` should be applied as well to indicate that this asset represents the model.
660+
In each case, the `mlm:model` **MUST** be applied as well to indicate that this asset represents the model.
646661

647662
It is also recommended to make use of the
648663
[file](https://github.com/stac-extensions/file?tab=readme-ov-file#asset--link-object-fields)

0 commit comments

Comments
 (0)