Skip to content

Commit f620629

Browse files
authored
fix: remove pytorch test for deprecated function (#4524)
* fix: remove pytorch test for deprecated function * reformat * flake8
1 parent 156f6ea commit f620629

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

tests/integ/test_pytorch.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@
2222
from sagemaker.serverless import ServerlessInferenceConfig
2323
from sagemaker.utils import unique_name_from_base
2424
from tests.integ import (
25-
test_region,
2625
DATA_DIR,
2726
TRAINING_DEFAULT_TIMEOUT_MINUTES,
28-
EI_SUPPORTED_REGIONS,
2927
)
3028
from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
3129

@@ -231,40 +229,6 @@ def test_deploy_packed_model_with_entry_point_name(
231229
assert output.shape == (batch_size, 10)
232230

233231

234-
@pytest.mark.skipif(
235-
test_region() not in EI_SUPPORTED_REGIONS, reason="EI isn't supported in that specific region."
236-
)
237-
def test_deploy_model_with_accelerator(
238-
sagemaker_session,
239-
cpu_instance_type,
240-
pytorch_eia_latest_version,
241-
pytorch_eia_latest_py_version,
242-
):
243-
endpoint_name = unique_name_from_base("test-pytorch-deploy-eia")
244-
model_data = sagemaker_session.upload_data(path=EIA_MODEL)
245-
pytorch = PyTorchModel(
246-
model_data,
247-
"SageMakerRole",
248-
entry_point=EIA_SCRIPT,
249-
framework_version=pytorch_eia_latest_version,
250-
py_version=pytorch_eia_latest_py_version,
251-
sagemaker_session=sagemaker_session,
252-
)
253-
with timeout_and_delete_endpoint_by_name(endpoint_name, sagemaker_session):
254-
predictor = pytorch.deploy(
255-
initial_instance_count=1,
256-
instance_type=cpu_instance_type,
257-
accelerator_type="ml.eia1.medium",
258-
endpoint_name=endpoint_name,
259-
)
260-
261-
batch_size = 100
262-
data = numpy.random.rand(batch_size, 1, 28, 28).astype(numpy.float32)
263-
output = predictor.predict(data)
264-
265-
assert output.shape == (batch_size, 10)
266-
267-
268232
def test_deploy_model_with_serverless_inference_config(
269233
pytorch_training_job,
270234
sagemaker_session,

0 commit comments

Comments
 (0)