Skip to content

Commit

Permalink
feat: updating integration test data
Browse files Browse the repository at this point in the history
  • Loading branch information
drduhe committed Nov 10, 2023
1 parent abd7721 commit 736d815
Show file tree
Hide file tree
Showing 10 changed files with 28,934 additions and 1,550 deletions.
1 change: 1 addition & 0 deletions bin/process_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"sicd_capella_chip_ntf": f"s3://{image_bucket}/sicd-capella-chip.ntf",
"sicd_umbra_chip_ntf": f"s3://{image_bucket}/sicd-umbra-chip.ntf",
"sicd_interferometric_hh_ntf": f"s3://{image_bucket}/sicd-interferometric-hh.nitf",
"wbid": f"s3://{image_bucket}/wbid.ntf",
}

# call into the root directory of this package so that we can run this script from anywhere.
Expand Down
23 changes: 9 additions & 14 deletions src/aws/osml/integ/sm_aircraft/test_sm_aircraft_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@

import logging

from aws.osml.utils import (
OSMLConfig,
count_features,
ddb_client,
kinesis_client,
run_model_on_image,
sqs_client,
validate_expected_feature_count,
)
from aws.osml.utils import OSMLConfig, kinesis_client, run_model_on_image, s3_client, sqs_client, validate_features_match

logger = logging.getLogger()
logger.setLevel(logging.INFO)
Expand All @@ -28,8 +20,11 @@ def test_model_runner_aircraft_model() -> None:
sqs_client(), OSMLConfig.SM_AIRCRAFT_MODEL, "SM_ENDPOINT", kinesis_client()
)

# Count the features created in the table for this image
feature_count = count_features(image_id=image_id, ddb_client=ddb_client())

# Validate the number of features we created match-expected values
validate_expected_feature_count(feature_count)
# Verify the results we created in the appropriate syncs
validate_features_match(
image_processing_request=image_processing_request,
job_id=job_id,
shard_iter=kinesis_shard,
s3_client=s3_client(),
kinesis_client=kinesis_client(),
)
6 changes: 4 additions & 2 deletions src/aws/osml/utils/integ_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def get_expected_image_feature_count(image: str) -> int:
"""
# Set the expected
if "large" in image:
return 99200
return 112200
elif "tile" in image:
return 2
elif "sicd-capella-chip" in image or "sicd-umbra-chip" in image:
Expand Down Expand Up @@ -560,7 +560,7 @@ def get_expected_region_request_count(image: str) -> int:
"""
expected_count = 0
if "small" in image:
expected_count = 4
expected_count = 1
elif "meta" in image:
expected_count = 1
elif "large" in image:
Expand All @@ -571,6 +571,8 @@ def get_expected_region_request_count(image: str) -> int:
expected_count = 1
elif "sicd-interferometric" in image:
expected_count = 8
elif "wbid" in image:
expected_count = 1

# Check that we got a valid region request count
if expected_count != 0:
Expand Down
4 changes: 2 additions & 2 deletions src/aws/osml/utils/osml_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class OSMLConfig:
TARGET_IMAGE: str = os.environ.get("TARGET_IMAGE")
TARGET_MODEL: str = os.environ.get("TARGET_MODEL")
TILE_FORMAT: str = os.environ.get("TILE_FORMAT", "GTIFF")
TILE_COMPRESSION: str = os.environ.get("TILE_COMPRESSION", "LZW")
TILE_COMPRESSION: str = os.environ.get("TILE_COMPRESSION", "NONE")
TILE_SIZE: int = int(os.environ.get("TILE_SIZE", "512"))
TILE_OVERLAP: int = int(os.environ.get("TILE_OVERLAP", "32"))
TILE_OVERLAP: int = int(os.environ.get("TILE_OVERLAP", "128"))
FEATURE_SELECTION_OPTIONS: str = os.environ.get(
"FEATURE_SELECTION_OPTIONS",
'{"algorithm": "NMS", "iou_threshold": 0.75, "skip_box_threshold": 0.0001, "sigma": .1}',
Expand Down
1 change: 1 addition & 0 deletions src/data/aircraft.tile.jpeg.geojson

Large diffs are not rendered by default.

Loading

0 comments on commit 736d815

Please sign in to comment.