Skip to content

fix: remove failing deprecated tests from suite #4533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions tests/integ/test_mxnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import numpy
import pytest

import tests.integ
from sagemaker import ModelPackage
from sagemaker.mxnet.estimator import MXNet
from sagemaker.mxnet.model import MXNetModel
Expand Down Expand Up @@ -384,42 +383,6 @@ def test_deploy_model_and_update_endpoint(
assert new_config["ProductionVariants"][0]["InitialInstanceCount"] == 1


@pytest.mark.skipif(
tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
reason="EI isn't supported in that specific region.",
)
def test_deploy_model_with_accelerator(
mxnet_training_job,
sagemaker_session,
mxnet_eia_latest_version,
mxnet_eia_latest_py_version,
cpu_instance_type,
):
endpoint_name = unique_name_from_base("test-mxnet-deploy-model-ei")

with timeout_and_delete_endpoint_by_name(endpoint_name, sagemaker_session):
desc = sagemaker_session.sagemaker_client.describe_training_job(
TrainingJobName=mxnet_training_job
)
model_data = desc["ModelArtifacts"]["S3ModelArtifacts"]
script_path = os.path.join(DATA_DIR, "mxnet_mnist", "mnist_ei.py")
model = MXNetModel(
model_data,
"SageMakerRole",
entry_point=script_path,
framework_version=mxnet_eia_latest_version,
py_version=mxnet_eia_latest_py_version,
sagemaker_session=sagemaker_session,
)
predictor = model.deploy(
1, cpu_instance_type, endpoint_name=endpoint_name, accelerator_type="ml.eia1.medium"
)

data = numpy.zeros(shape=(1, 1, 28, 28))
result = predictor.predict(data)
assert result is not None


def test_deploy_model_with_serverless_inference_config(
mxnet_training_job,
sagemaker_session,
Expand Down
13 changes: 0 additions & 13 deletions tests/integ/test_tfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,19 +153,6 @@ def test_predict(tfs_predictor):
assert expected_result == result


@pytest.mark.skipif(
tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
reason="EI is not supported in region {}".format(tests.integ.test_region()),
)
@pytest.mark.release
def test_predict_with_accelerator(tfs_predictor_with_accelerator):
input_data = {"instances": [1.0, 2.0, 5.0]}
expected_result = {"predictions": [3.5, 4.0, 5.5]}

result = tfs_predictor_with_accelerator.predict(input_data)
assert expected_result == result


@pytest.mark.local_mode
def test_predict_with_entry_point(tfs_predictor_with_model_and_entry_point_same_tar):
input_data = {"instances": [1.0, 2.0, 5.0]}
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/test_model_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,9 @@ def test_carry_over_additional_content_from_model_package_group(session, model_p
assert mc.additional_information.custom_details == CUSTOM_DETAILS


@pytest.mark.skip(
"temporary skip until error pattern is updated for py311 number|MetricTypeEnum.NUMBER"
)
def test_metric_type_value_mismatch():
with pytest.raises(
ValueError,
Expand Down