Skip to content

Commit 959cb0f

Browse files
akrishna1995Ashwin Krishna
and
Ashwin Krishna
authored
fix: remove failing deprecated tests from suite (aws#4533)
* fix: remove failing deprecated tests from suite * fix: broken black-check * fix: flake8 * fix: black-check, skip test breaking py311 --------- Co-authored-by: Ashwin Krishna <[email protected]>
1 parent e163807 commit 959cb0f

File tree

3 files changed

+3
-50
lines changed

3 files changed

+3
-50
lines changed

tests/integ/test_mxnet.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import numpy
1919
import pytest
2020

21-
import tests.integ
2221
from sagemaker import ModelPackage
2322
from sagemaker.mxnet.estimator import MXNet
2423
from sagemaker.mxnet.model import MXNetModel
@@ -384,42 +383,6 @@ def test_deploy_model_and_update_endpoint(
384383
assert new_config["ProductionVariants"][0]["InitialInstanceCount"] == 1
385384

386385

387-
@pytest.mark.skipif(
388-
tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
389-
reason="EI isn't supported in that specific region.",
390-
)
391-
def test_deploy_model_with_accelerator(
392-
mxnet_training_job,
393-
sagemaker_session,
394-
mxnet_eia_latest_version,
395-
mxnet_eia_latest_py_version,
396-
cpu_instance_type,
397-
):
398-
endpoint_name = unique_name_from_base("test-mxnet-deploy-model-ei")
399-
400-
with timeout_and_delete_endpoint_by_name(endpoint_name, sagemaker_session):
401-
desc = sagemaker_session.sagemaker_client.describe_training_job(
402-
TrainingJobName=mxnet_training_job
403-
)
404-
model_data = desc["ModelArtifacts"]["S3ModelArtifacts"]
405-
script_path = os.path.join(DATA_DIR, "mxnet_mnist", "mnist_ei.py")
406-
model = MXNetModel(
407-
model_data,
408-
"SageMakerRole",
409-
entry_point=script_path,
410-
framework_version=mxnet_eia_latest_version,
411-
py_version=mxnet_eia_latest_py_version,
412-
sagemaker_session=sagemaker_session,
413-
)
414-
predictor = model.deploy(
415-
1, cpu_instance_type, endpoint_name=endpoint_name, accelerator_type="ml.eia1.medium"
416-
)
417-
418-
data = numpy.zeros(shape=(1, 1, 28, 28))
419-
result = predictor.predict(data)
420-
assert result is not None
421-
422-
423386
def test_deploy_model_with_serverless_inference_config(
424387
mxnet_training_job,
425388
sagemaker_session,

tests/integ/test_tfs.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,6 @@ def test_predict(tfs_predictor):
153153
assert expected_result == result
154154

155155

156-
@pytest.mark.skipif(
157-
tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
158-
reason="EI is not supported in region {}".format(tests.integ.test_region()),
159-
)
160-
@pytest.mark.release
161-
def test_predict_with_accelerator(tfs_predictor_with_accelerator):
162-
input_data = {"instances": [1.0, 2.0, 5.0]}
163-
expected_result = {"predictions": [3.5, 4.0, 5.5]}
164-
165-
result = tfs_predictor_with_accelerator.predict(input_data)
166-
assert expected_result == result
167-
168-
169156
@pytest.mark.local_mode
170157
def test_predict_with_entry_point(tfs_predictor_with_model_and_entry_point_same_tar):
171158
input_data = {"instances": [1.0, 2.0, 5.0]}

tests/unit/test_model_card.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,9 @@ def test_carry_over_additional_content_from_model_package_group(session, model_p
12041204
assert mc.additional_information.custom_details == CUSTOM_DETAILS
12051205

12061206

1207+
@pytest.mark.skip(
1208+
"temporary skip until error pattern is updated for py311 number|MetricTypeEnum.NUMBER"
1209+
)
12071210
def test_metric_type_value_mismatch():
12081211
with pytest.raises(
12091212
ValueError,

0 commit comments

Comments
 (0)