From 5b7016215ffb643b145dacb75aa240f403cc1398 Mon Sep 17 00:00:00 2001 From: Erick Benitez-Ramos Date: Sun, 8 Dec 2024 19:12:57 -0800 Subject: [PATCH 1/2] Fix: image_detector --- src/sagemaker/image_uri_config/xgboost.json | 2 +- src/sagemaker/serve/detector/image_detector.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sagemaker/image_uri_config/xgboost.json b/src/sagemaker/image_uri_config/xgboost.json index e1a312e61c..88d621af49 100644 --- a/src/sagemaker/image_uri_config/xgboost.json +++ b/src/sagemaker/image_uri_config/xgboost.json @@ -1,7 +1,7 @@ { "inference": { "version_aliases": { - "latest": "1.7-1" + "latest": "1" }, "versions": { "1": { diff --git a/src/sagemaker/serve/detector/image_detector.py b/src/sagemaker/serve/detector/image_detector.py index 63831f5950..d8bee9deb8 100644 --- a/src/sagemaker/serve/detector/image_detector.py +++ b/src/sagemaker/serve/detector/image_detector.py @@ -43,7 +43,7 @@ def auto_detect_container(model, region: str, instance_type: str) -> str: casted_versions = _cast_to_compatible_version(fw, fw_version) if fw_version else (None,) dlc = None - for casted_version in casted_versions: + for casted_version in filter(None, casted_versions): try: dlc = image_uris.retrieve( framework=fw, From b08d9d2e5023b465f7d6789bb4057a0100c1108a Mon Sep 17 00:00:00 2001 From: Erick Benitez-Ramos Date: Mon, 9 Dec 2024 11:47:19 -0800 Subject: [PATCH 2/2] Filter None in other util --- src/sagemaker/serve/model_format/mlflow/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sagemaker/serve/model_format/mlflow/utils.py b/src/sagemaker/serve/model_format/mlflow/utils.py index 0d41cf4e33..69082fe575 100644 --- a/src/sagemaker/serve/model_format/mlflow/utils.py +++ b/src/sagemaker/serve/model_format/mlflow/utils.py @@ -350,7 +350,7 @@ def _select_container_for_mlflow_model( ) image_uri = None - for casted_version in casted_versions: + for casted_version in filter(None, casted_versions): try: image_uri = image_uris.retrieve( framework=framework_to_use,