@@ -224,14 +224,18 @@ It is recommended to define `accelerator` with one of the following values:
224
224
- ` intel-ipex-gpu ` for models optimized with IPEX for Intel GPUs
225
225
- ` macos-arm ` for models trained on Apple Silicon
226
226
227
- > :warning : <br >
227
+ <!-- lint disable no-undefined-references -->
228
+
229
+ > [ !WARNING]
228
230
> If ` mlm:accelerator = amd64 ` , this explicitly indicates that the model does not (and will not try to) use any
229
231
> accelerator, even if some are available from the runtime environment. This is to be distinguished from
230
232
> the value ` mlm:accelerator = null ` , which means that the model * could* make use of some accelerators if provided,
231
233
> but is not constrained by any specific one. To improve comprehension by users, it is recommended that any model
232
234
> using ` mlm:accelerator = amd64 ` also set explicitly ` mlm:accelerator_constrained = true ` to illustrate that the
233
235
> model ** WILL NOT** use accelerators, although the hardware resolution should be identical nonetheless.
234
236
237
+ <!-- lint enable no-undefined-references -->
238
+
235
239
When ` mlm:accelerator = null ` is employed, the value of ` mlm:accelerator_constrained ` can be ignored, since even if
236
240
set to ` true ` , there would be no ` accelerator ` to contain against. To avoid confusion, it is suggested to set the
237
241
` mlm:accelerator_constrained = false ` or omit the field entirely in this case.
@@ -265,20 +269,37 @@ representing bands information, including notably the `nodata` value,
265
269
the ` data_type ` (see also [ Data Type Enum] ( #data-type-enum ) ),
266
270
and [ Common Band Names] [ stac-band-names ] .
267
271
268
- > :information_source : <br >
272
+ <!-- lint disable no-undefined-references -->
273
+
274
+ > [ !WARNING]
275
+ > Only versions ` v1.x ` of ` eo ` and ` raster ` are supported to provide ` mlm:input ` band references.
276
+ > Versions ` 2.x ` of those extensions rely on the [ STAC 1.1 - Band Object] [ stac-1.1-band ] instead.
277
+ > If those versions are desired, consider migrating your MLM definition to use [ STAC 1.1 - Band Object] [ stac-1.1-band ]
278
+ > as well for referencing ` mlm:input ` with band names.
279
+
280
+ > [ !NOTE]
269
281
> Due to how the schema for [ ` eo:bands ` ] [ stac-eo-band ] is defined, it is not sufficient to * only* provide
270
282
> the ` eo:bands ` property at the STAC Item level. The schema validation of the EO extension explicitly looks
271
283
> for a corresponding set of bands under an Asset, and if none is found, it disallows ` eo:bands ` in the Item properties.
272
284
> Therefore, ` eo:bands ` should either be specified * only* under the Asset containing the ` mlm:model ` role
273
285
> (see [ Model Asset] ( #model-asset ) ), or define them * both* under the Asset and Item properties. If the second
274
286
> approach is selected, it is recommended that the ` eo:bands ` under the Asset contains only the ` name ` or the
275
287
> ` common_name ` property, such that all other details about the bands are defined at the Item level.
288
+ > An example of such representation is provided in
289
+ > [ examples/item_eo_bands_summarized.json] ( examples/item_eo_bands_summarized.json ) .
290
+ > <br ><br >
291
+ > For an example where ` eo:bands ` are entirely defined in the Asset on their own, please refer to
292
+ > [ examples/item_eo_bands.json] ( examples/item_eo_bands.json ) instead.
276
293
> <br ><br >
277
294
> For more details, refer to [ stac-extensions/eo #12 ] ( https://github.com/stac-extensions/eo/issues/12 ) .
278
295
> <br >
279
- > For an example, please refer to [ examples/item_eo_bands.json] ( examples/item_eo_bands.json ) .
280
- > Notably in this example, the ` assets.weights.eo:bands ` property provides the ` name ` to fulfill the Asset requirement,
281
- > while all additional band details are provided in ` properties.eo:bands ` .
296
+
297
+ > [ !NOTE]
298
+ > When using ` raster:bands ` , and additional ` name ` parameter ** MUST** be provided for each band. This parameter
299
+ > is not defined in ` raster ` extension itself, but is permitted. This addition is required to ensure
300
+ > that ` mlm:input ` bands referenced by name can be associated to their respective ` raster:bands ` definitions.
301
+
302
+ <!-- lint enable no-undefined-references -->
282
303
283
304
Only bands used as input to the model should be included in the MLM ` bands ` field.
284
305
To avoid duplicating the information, MLM only uses the ` name ` of whichever "Band Object" is defined in the STAC Item.
@@ -294,12 +315,12 @@ to normalize all bands, rather than normalizing the values over a single product
294
315
applied differently for distinct [ Model Input] ( #model-input-object ) definitions, in order to adjust for intrinsic
295
316
properties of the model.
296
317
297
- [ stac-1.1-band ] : https://github.com/radiantearth/stac-spec/pull/1254
298
- [ stac-1.1-stats ] : https://github.com/radiantearth/stac-spec/blob/bands/item-spec /common-metadata.md#statistics-object
299
- [ stac-eo-band ] : https://github.com/stac-extensions/eo?tab=readme-ov-file #band-object
300
- [ stac-raster-band ] : https://github.com/stac-extensions/raster?tab=readme-ov-file #raster-band-object
301
- [ stac-raster-stats ] : https://github.com/stac-extensions/raster?tab=readme-ov-file #statistics-object
302
- [ stac-band-names ] : https://github.com/stac-extensions/eo?tab=readme-ov-file #common-band-names
318
+ [ stac-1.1-band ] : https://github.com/radiantearth/stac-spec/blob/v1.1.0/commons/common-metadata.md#bands
319
+ [ stac-1.1-stats ] : https://github.com/radiantearth/stac-spec/blob/v1.1.0/commons /common-metadata.md#statistics-object
320
+ [ stac-eo-band ] : https://github.com/stac-extensions/eo/tree/v1.1.0 #band-object
321
+ [ stac-raster-band ] : https://github.com/stac-extensions/raster/tree/v1.1.0 #raster-band-object
322
+ [ stac-raster-stats ] : https://github.com/stac-extensions/raster/tree/v1.1.0 #statistics-object
323
+ [ stac-band-names ] : https://github.com/stac-extensions/eo#common-band-names
303
324
304
325
#### Model Band Object
305
326
@@ -309,10 +330,14 @@ properties of the model.
309
330
| format | string | The type of expression that is specified in the ` expression ` property. |
310
331
| expression | \* | An expression compliant with the ` format ` specified. The expression can be applied to any data type and depends on the ` format ` given. |
311
332
312
- > :information_source : <br >
333
+ <!-- lint disable no-undefined-references -->
334
+
335
+ > [ !NOTE]
313
336
> Although ` format ` and ` expression ` are not required in this context, they are mutually dependent on each other. <br >
314
337
> See also [ Processing Expression] ( #processing-expression ) for more details and examples.
315
338
339
+ <!-- lint enable no-undefined-references -->
340
+
316
341
The ` format ` and ` expression ` properties can serve multiple purpose.
317
342
318
343
1 . Applying a band-specific pre-processing step,
@@ -441,14 +466,18 @@ the following formats are recommended as alternative scripts and function refere
441
466
| ` docker ` | string | An URI with image and tag to a Docker. | ` ghcr.io/NAMESPACE/IMAGE_NAME:latest ` |
442
467
| ` uri ` | string | An URI to some binary or script. | ` {"href": "https://raw.githubusercontent.com/ORG/REPO/TAG/package/cli.py", "type": "text/x-python"} ` |
443
468
444
- > :information_source : <br >
469
+ <!-- lint disable no-undefined-references -->
470
+
471
+ > [ !NOTE]
445
472
> Above definitions are only indicative, and more can be added as desired with even more custom definitions.
446
473
> It is left as an implementation detail for users to resolve how these expressions should be handled at runtime.
447
474
448
- > : warning : < br >
475
+ > [ !WARNING ]
449
476
> See also discussion regarding additional processing expressions:
450
477
> [ stac-extensions/processing #31 ] ( https://github.com/stac-extensions/processing/issues/31 )
451
478
479
+ <!-- lint enable no-undefined-references -->
480
+
452
481
[ stac-proc-expr ] : https://github.com/stac-extensions/processing#expression-object
453
482
454
483
### Model Output Object
@@ -543,10 +572,14 @@ In order to provide more context, the following roles are also recommended were
543
572
| mlm: model | ` model ` | Required role for [ Model Asset] ( #model-asset ) . |
544
573
| mlm: source_code | ` code ` | Required role for [ Model Asset] ( #source-code-asset ) . |
545
574
546
- > :information_source : <br >
575
+ <!-- lint disable no-undefined-references -->
576
+
577
+ > [ !NOTE]
547
578
> (* ) These roles are offered as direct conversions from the previous extension
548
579
> that provided [ ML-Model Asset Roles] [ ml-model-asset-roles ] to provide easier upgrade to the MLM extension.
549
580
581
+ <!-- lint enable no-undefined-references -->
582
+
550
583
[ ml-model-asset-roles ] : https://github.com/stac-extensions/ml-model?tab=readme-ov-file#asset-objects
551
584
552
585
### Model Asset
0 commit comments