Skip to content

Commit 88dbcc2

Browse files
authored
fix(tests): Replace deprecated ml.t2.medium in integ fixtures (#6284)
SageMaker hosting rejects the T2 family on CreateEndpointConfig ('Deprecated instance type "T2"'), which makes test_multi_data_model_deploy_pretrained_models_update_endpoint fail deterministically on every master-v2 integ run. The alternative_cpu_instance_type fixture now returns ml.c5.xlarge in all regions (the value it already used for NO_T2_REGIONS), and the lineage static-endpoint helper deploys on ml.m5.xlarge. Both still differ from cpu_instance_type, which is what the update-endpoint assertion relies on. --- X-AI-Prompt: fix pre-existing V2 integ failure caused by deprecated ml.t2 instance type X-AI-Tool: Kiro
1 parent 58e4ca8 commit 88dbcc2

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

‎tests/conftest.py‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@
5858
"ap-south-1", # no p3 availability
5959
]
6060

61-
NO_T2_REGIONS = ["eu-north-1", "ap-east-1", "me-south-1"]
62-
6361
FRAMEWORKS_FOR_GENERATED_VERSION_FIXTURES = (
6462
"chainer",
6563
"coach_mxnet",
@@ -666,12 +664,11 @@ def ec2_instance_type(cpu_instance_type):
666664

667665
@pytest.fixture(scope="session")
668666
def alternative_cpu_instance_type(sagemaker_session, request):
669-
region = sagemaker_session.boto_session.region_name
670-
if region in NO_T2_REGIONS:
671-
# T3 is not supported by hosting yet
672-
return "ml.c5.xlarge"
673-
else:
674-
return "ml.t2.medium"
667+
# SageMaker hosting no longer accepts the T2 family (CreateEndpointConfig
668+
# rejects it with 'Deprecated instance type "T2"'). ml.c5.xlarge is
669+
# available in every region and differs from cpu_instance_type, which is
670+
# all the update-endpoint tests need.
671+
return "ml.c5.xlarge"
675672

676673

677674
@pytest.fixture(scope="session")

‎tests/integ/sagemaker/lineage/conftest.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ def _deploy_static_endpoint(execution_arn, sagemaker_session):
885885
model_package_arn=model_package_arn,
886886
sagemaker_session=sagemaker_session,
887887
)
888-
model_package.deploy(1, "ml.t2.medium", endpoint_name=STATIC_ENDPOINT_NAME)
888+
model_package.deploy(1, "ml.m5.xlarge", endpoint_name=STATIC_ENDPOINT_NAME)
889889
time.sleep(120)
890890
except ClientError as e:
891891
if e.response["Error"]["Code"] == "ValidationException":

0 commit comments

Comments
 (0)