From e6412879f479d758f6f4467b553d88f3438f4e07 Mon Sep 17 00:00:00 2001 From: Ranbir Aulakh Date: Mon, 23 Sep 2024 17:55:41 +0000 Subject: [PATCH] fix: validate kinesis extends to appends --- environment.yml | 2 +- src/aws/osml/utils/integ_utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/environment.yml b/environment.yml index 80f6d82..efa4fbe 100644 --- a/environment.yml +++ b/environment.yml @@ -1,4 +1,4 @@ -name: osml_models +name: osml_model_runner_test channels: - conda-forge dependencies: diff --git a/src/aws/osml/utils/integ_utils.py b/src/aws/osml/utils/integ_utils.py index 297978a..69b1d14 100644 --- a/src/aws/osml/utils/integ_utils.py +++ b/src/aws/osml/utils/integ_utils.py @@ -272,7 +272,7 @@ def validate_kinesis_features_match( for record in records: # Look for records that pertain to the target image_id if record["PartitionKey"] == job_id: - kinesis_features.extend(geojson.loads(record["Data"])["features"]) + kinesis_features.append(geojson.loads(record["Data"])["features"]) else: logging.warning(f"Found partition key: {record['PartitionKey']}") logging.warning(f"Looking for partition key: {job_id}") @@ -402,9 +402,9 @@ def build_image_processing_request(endpoint: str, endpoint_type: str, image_url: In the future this could, and probably should, be extended to build more variant image requests for additional testing configurations. + :param endpoint: Model endpoint that you want to build the image_request for :param endpoint_type: The type of endpoint you want to build the image_request for SM/HTTP :param image_url: URL to the image you want to process - :param endpoint: Model endpoint that you want to build the image_request for :return: Dictionary representation of the image request """