Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

Commit 2d8f0b8

Browse files
committed
Add ml-model:type field for API filtering
1 parent fde68ce commit 2d8f0b8

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ these models for the following types of use-cases:
5555

5656
| Field Name | Type | Description |
5757
| -------------------------- | ------------------------- | ----------- |
58-
| ml-model:learning_approach | string | **REQUIRED**. The learning approach used to train the model. It is STRONGLY RECOMMENDED that you use one of the values [described below](#ml-modellearning_approach), but other values are allowed. |
58+
| ml-model:type | string | **REQUIRED.** This MUST always be the constant `"ml-model"`. This purpose of this field is to provide a convenient way to filter ML Model Items in a STAC API. |
59+
| ml-model:learning_approach | string | **REQUIRED.** The learning approach used to train the model. It is STRONGLY RECOMMENDED that you use one of the values [described below](#ml-modellearning_approach), but other values are allowed. |
5960
| ml-model:prediction_type | string | **REQUIRED.** The type of prediction that the model makes. It is STRONGLY RECOMMENDED that you use one of the values [described below](#ml-modelprediction_type), but other values are allowed. |
6061
| ml-model:architecture | string | **REQUIRED.** Identifies the architecture employed by the model (e.g. RCNN, U-Net, etc.). This may be any string identifier, but publishers are encouraged to use well-known identifiers whenever possible. |
6162
| ml-model:training-environment | [Training Environment Object](#training-environment-object) | Describes the environment used to train the model. See the Link [relation types](#relation-types) defined below for definitions of the data used during training. |

examples/cyclone-wind-speed/item.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"https://stac-extensions.github.io/scientific/v1.0.0/schema.json"
66
],
77
"type": "Feature",
8-
"id": "model-item",
8+
"id": "model-cyclone-wind-estimation-torchgeo",
99
"bbox": [
1010
-179.999,
1111
-4.5,
@@ -78,6 +78,7 @@
7878
"url": "https://www.microsoft.com/en-us/ai/ai-for-good"
7979
}
8080
],
81+
"ml-model:type": "ml-model",
8182
"ml-model:learning_approach": "supervised",
8283
"ml-model:prediction_type": "regression",
8384
"ml-model:architecture": "resnet18",

examples/dummy/item.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"url": "https://nrcan-rncan.gc.ca"
5353
}
5454
],
55+
"ml-model:type": "ml-model",
5556
"ml-model:learning_approach": "supervised",
5657
"ml-model:prediction_type": "object-detection",
5758
"ml-model:architecture": "RCNN",

json-schema/schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
{
2727
"$comment": "Require fields here for Item Properties.",
2828
"required": [
29+
"ml-model:type",
2930
"ml-model:learning_approach",
3031
"ml-model:prediction_type",
3132
"ml-model:architecture"
@@ -169,6 +170,9 @@
169170
"$comment": "Add your new Item fields here. Don't require them here, do that above in the corresponding schema.",
170171
"type": "object",
171172
"properties": {
173+
"ml-model:type": {
174+
"const": "ml-model"
175+
},
172176
"ml-model:learning_approach": {
173177
"type": "string"
174178
},

0 commit comments

Comments
 (0)