From 3f0eceab1b3b61c16d45a7851dd94f78a55eae45 Mon Sep 17 00:00:00 2001 From: ZealSV Date: Wed, 4 Nov 2026 10:46:52 -0800 Subject: [PATCH] test(serve): run the recommender integ tests on ml.g6 and ml.g7 instances test_recommendation_workflow_end_to_end's recommendation job, and the endpoint the test deploys from its top recommendation, now use ml.g7.2xlarge instead of ml.g5.2xlarge. The JumpStart model, which the benchmark test deploys and the recommendation test builds, now uses ml.g6.2xlarge: JumpStart has no ml.g7 image configuration for it, and ml.g6.2xlarge gets the same serving image as ml.g5.2xlarge. --- .../test_ai_inference_recommender_integration.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sagemaker-serve/tests/integ/test_ai_inference_recommender_integration.py b/sagemaker-serve/tests/integ/test_ai_inference_recommender_integration.py index ee2b4d4f59..759da653fd 100644 --- a/sagemaker-serve/tests/integ/test_ai_inference_recommender_integration.py +++ b/sagemaker-serve/tests/integ/test_ai_inference_recommender_integration.py @@ -43,7 +43,8 @@ # serves /v1/chat/completions, matching the OpenAI api_standard the # synthetic Workload sends. MODEL_ID = "huggingface-llm-qwen2-1-5b-instruct" -INSTANCE_TYPE = "ml.g5.2xlarge" +MODEL_INSTANCE_TYPE = "ml.g6.2xlarge" +RECOMMENDATION_INSTANCE_TYPE = "ml.g7.2xlarge" WORKLOAD_TOKENIZER = "gpt2" WORKLOAD_REQUEST_COUNT = 10 WORKLOAD_CONCURRENCY = 1 @@ -63,7 +64,7 @@ def _build_synthetic_workload(): def _build_jumpstart_model_builder(role_arn): - compute = Compute(instance_type=INSTANCE_TYPE) + compute = Compute(instance_type=MODEL_INSTANCE_TYPE) jumpstart_config = JumpStartConfig(model_id=MODEL_ID) return ModelBuilder.from_jumpstart_config( jumpstart_config=jumpstart_config, compute=compute, role_arn=role_arn @@ -152,7 +153,7 @@ def test_recommendation_workflow_end_to_end(): recommendation_job = model_builder.generate_deployment_recommendations( workload=_build_synthetic_workload(), performance_target="throughput", - instance_types=[INSTANCE_TYPE], + instance_types=[RECOMMENDATION_INSTANCE_TYPE], advanced_optimization=False, framework="LMI", role_arn=role, @@ -197,10 +198,14 @@ def test_recommendation_workflow_end_to_end(): wait=True, ) logger.info(f"Recommendation endpoint deployed: {rec_endpoint.endpoint_name}") + rec_model = Model.get(model_name=rec_model_name) assert ( rec_endpoint.endpoint_status == "InService" ), f"Endpoint did not reach InService: {rec_endpoint.endpoint_status}" - rec_model = Model.get(model_name=rec_model_name) + variants = EndpointConfig.get( + endpoint_config_name=rec_endpoint_config_name + ).production_variants + assert [variant.instance_type for variant in variants] == [RECOMMENDATION_INSTANCE_TYPE] finally: if rec_endpoint and rec_model: