From fe6a08f031f6620a1e805ffcbc3e5a8576ab541d Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 1 Sep 2023 10:46:17 +0100 Subject: [PATCH] fixed reference to predictions --- .../Dockerfiles/Dockerfile.prediction.lambda | 3 +++ model_data/simulation_system/handlers/predictions_app.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/model_data/simulation_system/Dockerfiles/Dockerfile.prediction.lambda b/model_data/simulation_system/Dockerfiles/Dockerfile.prediction.lambda index 2e301b24..3ffd3354 100644 --- a/model_data/simulation_system/Dockerfiles/Dockerfile.prediction.lambda +++ b/model_data/simulation_system/Dockerfiles/Dockerfile.prediction.lambda @@ -3,6 +3,9 @@ FROM public.ecr.aws/lambda/python:3.10 # Set the working directory WORKDIR ${LAMBDA_TASK_ROOT} +# Install necessary build tools - required to test locally +RUN yum install -y gcc python3-devel + # Install python packages COPY requirements/predictions/predictions.txt ./simulation_system/requirements.txt RUN pip install --no-cache-dir -r ./simulation_system/requirements.txt diff --git a/model_data/simulation_system/handlers/predictions_app.py b/model_data/simulation_system/handlers/predictions_app.py index 1f3a5c8b..02b1673f 100644 --- a/model_data/simulation_system/handlers/predictions_app.py +++ b/model_data/simulation_system/handlers/predictions_app.py @@ -1,6 +1,6 @@ import os import urllib.parse -from predictions import prediction +from ..predictions import prediction RUNTIME_ENVIRONMENT = os.environ.get("RUNTIME_ENVIRONMENT", "dev") @@ -30,7 +30,8 @@ def handler(event, context): # model_path = os.environ.get("MODEL_PATH", "http://minio:9000/data/model_directory/") model_path = os.environ.get( "MODEL_PATH", - "s3://retrofit-model-directory-{RUNTIME_ENVIRONMENT}/RDSAP_CHANGE/autogluon/rdsap_change-medium_quality-30-2023-08-30_11-43-41/deployment/", + "s3://retrofit-model-directory-{RUNTIME_ENVIRONMENT}/RDSAP_CHANGE/autogluon/rdsap_change-medium_quality-30" + "-2023-08-30_11-43-41/deployment/", ) try: