-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MLM extension #1542
base: main
Are you sure you want to change the base?
Add MLM extension #1542
Conversation
…, percentage, count
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1542 +/- ##
==========================================
+ Coverage 91.62% 92.34% +0.72%
==========================================
Files 54 55 +1
Lines 7578 8349 +771
Branches 923 959 +36
==========================================
+ Hits 6943 7710 +767
- Misses 451 453 +2
- Partials 184 186 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! Some minor tweaks requested, mostly spelling.
|
||
### Fixed | ||
- fixed missing parameter "title" in pystac.extensions.classification.Classification ([#1539](https://github.com/stac-utils/pystac/pull/1539)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Fixed | |
- fixed missing parameter "title" in pystac.extensions.classification.Classification ([#1539](https://github.com/stac-utils/pystac/pull/1539)) |
@property | ||
def mlm(self) -> MLMExtension[Item]: | ||
return MLMExtension.ext(self.stac_object) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this needs to be added to CollectionExt
too.
REGRESSION = ("regression",) | ||
CLASSIFICATION = ("classification",) | ||
SCENE_CLASSIFICATION = ("scene-classification",) | ||
DETECTION = ("detection",) | ||
OBJECT_DETECTION = ("object-detection",) | ||
SEGMENTATION = ("segmentation",) | ||
SEMANTIC_SEGMENTATION = ("semantic-segmentation",) | ||
INSTANCE_SEGMENTATION = ("instance-segmentation",) | ||
PANOPTIC_SEGMENTATION = ("panoptic-segmentation",) | ||
SIMILARITy_SEARCH = ("similarity-search",) | ||
GENERATIVE = ("generative",) | ||
IAMGE_CAPTIONING = ("image-captioning",) | ||
SUPER_RESOLUTION = "super-resolution" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason that some of these are one-tuples and others are strings?
name: Name of the band referring to an extended band definition | ||
format: The type of expression that is specified in the expression property | ||
expression: An expression compliant with the format specified. | ||
The cxpression can be applied to any data type and depends on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cxpression can be applied to any data type and depends on the | |
The expression can be applied to any data type and depends on the |
type: The type of ValueScaling operation for which required proreties are | ||
to be retrieved | ||
|
||
Returns: | ||
list[str]: names of proreties required for the given ``type`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type: The type of ValueScaling operation for which required proreties are | |
to be retrieved | |
Returns: | |
list[str]: names of proreties required for the given ``type`` | |
type: The type of ValueScaling operation for which required properties are | |
to be retrieved | |
Returns: | |
list[str]: names of properties required for the given ``type`` |
cls, type: ValueScalingType, props: dict[str, Any] | ||
) -> None: | ||
""" | ||
Validate whether given properties satisfy the requiremts set by the ValueScaling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validate whether given properties satisfy the requiremts set by the ValueScaling | |
Validate whether given properties satisfy the requirements set by the ValueScaling |
MLMExtension[T]: The extended object | ||
|
||
Raises: | ||
TypeError: When a :class:`pystac.Asset` object is apssed as the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeError: When a :class:`pystac.Asset` object is apssed as the | |
TypeError: When a :class:`pystac.Asset` object is passed as the |
@property | ||
def accelerator_constrained(self) -> bool | None: | ||
""" | ||
Get or set the accelerator_constrianed property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get or set the accelerator_constrianed property | |
Get or set the accelerator_constrained property |
""" | ||
Get or set this asset's compile_method property | ||
""" | ||
return self.properties.get(COMPILE_MDTHOD_ASSET_PROP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return self.properties.get(COMPILE_MDTHOD_ASSET_PROP) | |
return self.properties.get(COMPILE_METHOD_ASSET_PROP) |
""" | ||
Get or set this asset's entrypoint property asdfasdf | ||
""" | ||
return self.properties.get(ENTRYPOITN_ASSET_PROP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return self.properties.get(ENTRYPOITN_ASSET_PROP) | |
return self.properties.get(ENTRYPOINT_ASSET_PROP) |
Related Issue(s):
Description:
Adds the STAC:MLM extension: https://github.com/stac-extensions/mlm
PR Checklist:
pre-commit run --all-files
)pytest
)