From c6f7483c4c2d506db56b517151db45b891074b8d Mon Sep 17 00:00:00 2001 From: Francis Charette Migneault Date: Fri, 26 Apr 2024 21:14:13 -0400 Subject: [PATCH] add missing item_assets check + remove mlm:name unique requirement --- CHANGELOG.md | 8 ++++++-- README.md | 6 ++++-- json-schema/schema.json | 6 ++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44444ff..b5dfcec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/crim-ca/mlm-extension/tree/main) ### Added -- n/a +- Add the missing JSON schema `item_assets` definition under a Collection to ensure compatibility with + the [Item Assets](https://github.com/stac-extensions/item-assets) extension, as mentioned this specification. ### Changed - n/a @@ -17,7 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - n/a ### Removed -- n/a +- Field `mlm:name` requirement to be unique. There is no way to guarantee this from a single Item's definition + and their JSON schema validation. For uniqueness requirement, users should instead rely on the `id` property + of the Item, which is ensured to be unique under the corresponding Collection, since it would not be retrievable + otherwise (i.e.: `collections/{collectionID}/items/{itemID}`). ### Fixed - n/a diff --git a/README.md b/README.md index 4fe73c2..6ee4fc8 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,14 @@ The fields in the table below can be used in these parts of STAC documents: - [ ] Catalogs - [x] Collections - [x] Item Properties (incl. Summaries in Collections) -- [x] Assets (for both Collections and Items, incl. Item Asset Definitions in Collections, except `mlm:name`) +- [x] Assets (for both Collections and Items, incl. [Item-Assets][item-assets] definitions in Collections) - [ ] Links +[item-assets]: https://github.com/stac-extensions/item-assets + | Field Name | Type | Description | |-----------------------------|---------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| mlm:name | string | **REQUIRED** A unique name for the model. This can include, but must be distinct, from simply naming the model architecture. If there is a publication or other published work related to the model, use the official name of the model. | +| mlm:name | string | **REQUIRED** A name for the model. This can include, but must be distinct, from simply naming the model architecture. If there is a publication or other published work related to the model, use the official name of the model. | | mlm:architecture | [Model Architecture](#model-architecture) string | **REQUIRED** A generic and well established architecture name of the model. | | mlm:tasks | \[[Task Enum](#task-enum)] | **REQUIRED** Specifies the Machine Learning tasks for which the model can be used for. If multi-tasks outputs are provided by distinct model heads, specify all available tasks under the main properties and specify respective tasks in each [Model Output Object](#model-output-object). | | mlm:framework | string | Framework used to train the model (ex: PyTorch, TensorFlow). | diff --git a/json-schema/schema.json b/json-schema/schema.json index 7c58fc6..2a60b7a 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -78,6 +78,12 @@ "additionalProperties": { "$ref": "#/$defs/fields" } + }, + "item_assets": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/fields" + } } } },