forked from crim-ca/dlm-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove helper and use pystac.Item in example
- Loading branch information
Showing
6 changed files
with
64 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
|
||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def metadata_json(): | ||
from stac_model.examples import eurosat_resnet | ||
|
||
model_metadata_stac_item = eurosat_resnet() | ||
return model_metadata_stac_item | ||
|
||
def test_model_metadata_json_operations(model_metadata_stac_item): | ||
|
||
def test_model_metadata_to_dict(metadata_json): | ||
assert metadata_json.to_dict() | ||
|
||
|
||
def test_model_metadata_json_operations(metadata_json): | ||
from stac_model.schema import MLModelExtension | ||
model_metadata = MLModelExtension.apply(model_metadata_stac_item) | ||
assert model_metadata.mlm_name == "Resnet-18 Sentinel-2 ALL MOCO" | ||
|
||
assert MLModelExtension(metadata_json.to_dict()) |