Skip to content

Commit d986ddb

Browse files
committed
test(integ): remove deprecated ml.t2.medium and xfail capacity errors
SageMaker rejects `ml.t2.medium` with `ValidationException: Deprecated instance type "T2"` since 2026-09-03. The `alternative_cpu_instance_type` fixture returns `ml.c5.xlarge` in each region. The gated Llama 2 test gets `x_fail_if_ice`, the decorator of the other JumpStart deployment tests. `InsufficientInstanceCapacity` failed the Llama 2 endpoint in 5 of the last 6 `integ-tests` jobs. --- X-AI-Prompt: Can you make the integ tests pass in the pull request hook? X-AI-Tool: claude-code
1 parent 0901987 commit d986ddb

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

‎tests/conftest.py‎

Lines changed: 2 additions & 9 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",
@@ -665,13 +663,8 @@ def ec2_instance_type(cpu_instance_type):
665663

666664

667665
@pytest.fixture(scope="session")
668-
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"
666+
def alternative_cpu_instance_type():
667+
return "ml.c5.xlarge"
675668

676669

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

‎tests/integ/sagemaker/jumpstart/model/test_jumpstart_model.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ def test_jumpstart_gated_model_neuron(setup):
167167
assert response is not None
168168

169169

170+
@x_fail_if_ice
170171
def test_jumpstart_gated_model(setup):
171172

172173
model_id = "meta-textgeneration-llama-2-7b"
@@ -178,7 +179,6 @@ def test_jumpstart_gated_model(setup):
178179
sagemaker_session=get_sm_session(),
179180
)
180181

181-
# uses ml.g4dn.2xlarge instance
182182
predictor = model.deploy(
183183
tags=[{"Key": JUMPSTART_TAG, "Value": os.environ[ENV_VAR_JUMPSTART_SDK_TEST_SUITE_ID]}],
184184
accept_eula=True,

0 commit comments

Comments
 (0)