From fa178bef56d5c5a05d0a8a5d7cd0d8e551455478 Mon Sep 17 00:00:00 2001 From: Gary Wang <38331932+gwang111@users.noreply.github.com> Date: Mon, 23 Dec 2024 13:43:13 -0800 Subject: [PATCH 1/2] updated inference script to cover context (#4949) Co-authored-by: Erick Benitez-Ramos <141277478+benieric@users.noreply.github.com> --- .../serve/model_server/multi_model_server/inference.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sagemaker/serve/model_server/multi_model_server/inference.py b/src/sagemaker/serve/model_server/multi_model_server/inference.py index 1d2440f5f9..908ffcc7aa 100644 --- a/src/sagemaker/serve/model_server/multi_model_server/inference.py +++ b/src/sagemaker/serve/model_server/multi_model_server/inference.py @@ -21,7 +21,7 @@ METADATA_PATH = Path(__file__).parent.joinpath("metadata.json") -def model_fn(model_dir): +def model_fn(model_dir, context=None): """Overrides default method for loading a model""" shared_libs_path = Path(model_dir + "/shared_libs") @@ -40,7 +40,7 @@ def model_fn(model_dir): return partial(inference_spec.invoke, model=inference_spec.load(model_dir)) -def input_fn(input_data, content_type): +def input_fn(input_data, content_type, context=None): """Deserializes the bytes that were received from the model server""" try: if hasattr(schema_builder, "custom_input_translator"): @@ -72,12 +72,12 @@ def input_fn(input_data, content_type): raise Exception("Encountered error in deserialize_request.") from e -def predict_fn(input_data, predict_callable): +def predict_fn(input_data, predict_callable, context=None): """Invokes the model that is taken in by model server""" return predict_callable(input_data) -def output_fn(predictions, accept_type): +def output_fn(predictions, accept_type, context=None): """Prediction is serialized to bytes and sent back to the customer""" try: if hasattr(inference_spec, "postprocess"): From 8d566594a0433124dde1ad08be6083b552e7648c Mon Sep 17 00:00:00 2001 From: Prateek M Desai Date: Thu, 26 Dec 2024 09:55:46 -0800 Subject: [PATCH 2/2] add autogluon 1.2 (#4979) Co-authored-by: Ubuntu --- src/sagemaker/image_uri_config/autogluon.json | 90 ++++++++++++++++++- 1 file changed, 88 insertions(+), 2 deletions(-) diff --git a/src/sagemaker/image_uri_config/autogluon.json b/src/sagemaker/image_uri_config/autogluon.json index 68fcd8ca8a..f1edd9d287 100644 --- a/src/sagemaker/image_uri_config/autogluon.json +++ b/src/sagemaker/image_uri_config/autogluon.json @@ -12,7 +12,8 @@ "0.7": "0.7.0", "0.8": "0.8.2", "1.0": "1.0.0", - "1.1": "1.1.1" + "1.1": "1.1.1", + "1.2": "1.2.0" }, "versions": { "0.3.1": { @@ -563,6 +564,47 @@ "py_versions": [ "py311" ] + }, + "1.2.0": { + "registries": { + "af-south-1": "626614931356", + "il-central-1": "780543022126", + "ap-east-1": "871362719292", + "ap-northeast-1": "763104351884", + "ap-northeast-2": "763104351884", + "ap-northeast-3": "364406365360", + "ap-south-1": "763104351884", + "ap-southeast-1": "763104351884", + "ap-southeast-2": "763104351884", + "ap-southeast-3": "907027046896", + "ap-southeast-4": "457447274322", + "ca-central-1": "763104351884", + "eu-central-1": "763104351884", + "eu-north-1": "763104351884", + "eu-west-1": "763104351884", + "eu-west-2": "763104351884", + "eu-west-3": "763104351884", + "eu-south-1": "692866216735", + "me-south-1": "217643126080", + "sa-east-1": "763104351884", + "us-east-1": "763104351884", + "us-east-2": "763104351884", + "us-gov-east-1": "446045086412", + "us-gov-west-1": "442386744353", + "us-iso-east-1": "886529160074", + "us-isob-east-1": "094389454867", + "us-west-1": "763104351884", + "us-west-2": "763104351884", + "ca-west-1": "204538143572" + }, + "repository": "autogluon-training", + "processors": [ + "cpu", + "gpu" + ], + "py_versions": [ + "py311" + ] } } }, @@ -575,7 +617,8 @@ "0.7": "0.7.0", "0.8": "0.8.2", "1.0": "1.0.0", - "1.1": "1.1.1" + "1.1": "1.1.1", + "1.2": "1.2.0" }, "versions": { "0.3.1": { @@ -1157,6 +1200,49 @@ "py_versions": [ "py311" ] + }, + "1.2.0": { + "registries": { + "af-south-1": "626614931356", + "il-central-1": "780543022126", + "ap-east-1": "871362719292", + "ap-northeast-1": "763104351884", + "ap-northeast-2": "763104351884", + "ap-northeast-3": "364406365360", + "ap-south-1": "763104351884", + "ap-southeast-1": "763104351884", + "ap-southeast-2": "763104351884", + "ap-southeast-3": "907027046896", + "ap-southeast-4": "457447274322", + "ca-central-1": "763104351884", + "cn-north-1": "727897471807", + "cn-northwest-1": "727897471807", + "eu-central-1": "763104351884", + "eu-north-1": "763104351884", + "eu-west-1": "763104351884", + "eu-west-2": "763104351884", + "eu-west-3": "763104351884", + "eu-south-1": "692866216735", + "me-south-1": "217643126080", + "sa-east-1": "763104351884", + "us-east-1": "763104351884", + "us-east-2": "763104351884", + "us-gov-east-1": "446045086412", + "us-gov-west-1": "442386744353", + "us-iso-east-1": "886529160074", + "us-isob-east-1": "094389454867", + "us-west-1": "763104351884", + "us-west-2": "763104351884", + "ca-west-1": "204538143572" + }, + "repository": "autogluon-inference", + "processors": [ + "cpu", + "gpu" + ], + "py_versions": [ + "py311" + ] } } }