Skip to content

Commit a47a3a6

Browse files
committed
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.
1 parent 02cd0dd commit a47a3a6

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎sagemaker-serve/tests/integ/test_ai_inference_recommender_integration.py‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@
4343
# serves /v1/chat/completions, matching the OpenAI api_standard the
4444
# synthetic Workload sends.
4545
MODEL_ID = "huggingface-llm-qwen2-1-5b-instruct"
46-
INSTANCE_TYPE = "ml.g5.2xlarge"
46+
# The JumpStart model's instance type: the benchmark test deploys the model on it, and the
47+
# recommendation test builds the model with it, which picks its serving image. JumpStart has no
48+
# ml.g7 image configuration for this model.
49+
MODEL_INSTANCE_TYPE = "ml.g6.2xlarge"
50+
# The recommendation test's job deploys its candidates on this instance type, and the test deploys
51+
# the top one on it.
52+
RECOMMENDATION_INSTANCE_TYPE = "ml.g7.2xlarge"
4753
WORKLOAD_TOKENIZER = "gpt2"
4854
WORKLOAD_REQUEST_COUNT = 10
4955
WORKLOAD_CONCURRENCY = 1
@@ -63,7 +69,7 @@ def _build_synthetic_workload():
6369

6470

6571
def _build_jumpstart_model_builder(role_arn):
66-
compute = Compute(instance_type=INSTANCE_TYPE)
72+
compute = Compute(instance_type=MODEL_INSTANCE_TYPE)
6773
jumpstart_config = JumpStartConfig(model_id=MODEL_ID)
6874
return ModelBuilder.from_jumpstart_config(
6975
jumpstart_config=jumpstart_config, compute=compute, role_arn=role_arn
@@ -152,7 +158,7 @@ def test_recommendation_workflow_end_to_end():
152158
recommendation_job = model_builder.generate_deployment_recommendations(
153159
workload=_build_synthetic_workload(),
154160
performance_target="throughput",
155-
instance_types=[INSTANCE_TYPE],
161+
instance_types=[RECOMMENDATION_INSTANCE_TYPE],
156162
advanced_optimization=False,
157163
framework="LMI",
158164
role_arn=role,

0 commit comments

Comments
 (0)