|
22 | 22 | from sagemaker.serverless import ServerlessInferenceConfig
|
23 | 23 | from sagemaker.utils import unique_name_from_base
|
24 | 24 | from tests.integ import (
|
25 |
| - test_region, |
26 | 25 | DATA_DIR,
|
27 | 26 | TRAINING_DEFAULT_TIMEOUT_MINUTES,
|
28 |
| - EI_SUPPORTED_REGIONS, |
29 | 27 | )
|
30 | 28 | from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
|
31 | 29 |
|
@@ -231,40 +229,6 @@ def test_deploy_packed_model_with_entry_point_name(
|
231 | 229 | assert output.shape == (batch_size, 10)
|
232 | 230 |
|
233 | 231 |
|
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 |
| - |
268 | 232 | def test_deploy_model_with_serverless_inference_config(
|
269 | 233 | pytorch_training_job,
|
270 | 234 | sagemaker_session,
|
|
0 commit comments