Skip to content

fix: skip auto_ml tests in non us-east-2 canary tests #1155

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

Closed
wants to merge 3 commits into from
Closed
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
16 changes: 8 additions & 8 deletions tests/integ/auto_ml_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@

def create_auto_ml_job_if_not_exist(sagemaker_session):
auto_ml_job_name = "python-sdk-integ-test-base-job"
auto_ml = AutoML(
role=ROLE,
target_attribute_name=TARGET_ATTRIBUTE_NAME,
sagemaker_session=sagemaker_session,
max_candidates=3,
)

try:
auto_ml.describe_auto_ml_job(job_name=auto_ml_job_name)
sagemaker_session.describe_auto_ml_job(job_name=auto_ml_job_name)
except Exception as e: # noqa: F841
auto_ml = AutoML(
role=ROLE,
target_attribute_name=TARGET_ATTRIBUTE_NAME,
sagemaker_session=sagemaker_session,
max_candidates=3,
)
inputs = sagemaker_session.upload_data(path=TRAINING_DATA, key_prefix=PREFIX + "/input")
with timeout(minutes=AUTO_ML_DEFAULT_TIMEMOUT_MINUTES):
auto_ml.fit(inputs, job_name=auto_ml_job_name)
auto_ml.fit(inputs, job_name=auto_ml_job_name, wait=True)
24 changes: 12 additions & 12 deletions tests/integ/test_auto_ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@


@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
tests.integ.test_region() != "us-east-2",
reason="AutoML is not supported in the region yet.",
)
def test_auto_ml_fit(sagemaker_session):
Expand All @@ -81,7 +81,7 @@ def test_auto_ml_fit(sagemaker_session):


@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
tests.integ.test_region() != "us-east-2",
reason="AutoML is not supported in the region yet.",
)
def test_auto_ml_fit_local_input(sagemaker_session):
Expand All @@ -98,7 +98,7 @@ def test_auto_ml_fit_local_input(sagemaker_session):


@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
tests.integ.test_region() != "us-east-2",
reason="AutoML is not supported in the region yet.",
)
def test_auto_ml_input_object_fit(sagemaker_session):
Expand All @@ -115,7 +115,7 @@ def test_auto_ml_input_object_fit(sagemaker_session):


@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
tests.integ.test_region() != "us-east-2",
reason="AutoML is not supported in the region yet.",
)
def test_auto_ml_fit_optional_args(sagemaker_session):
Expand Down Expand Up @@ -144,7 +144,7 @@ def test_auto_ml_fit_optional_args(sagemaker_session):


@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
tests.integ.test_region() != "us-east-2",
reason="AutoML is not supported in the region yet.",
)
def test_auto_ml_invalid_target_attribute(sagemaker_session):
Expand All @@ -159,7 +159,7 @@ def test_auto_ml_invalid_target_attribute(sagemaker_session):


@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
tests.integ.test_region() != "us-east-2",
reason="AutoML is not supported in the region yet.",
)
def test_auto_ml_describe_auto_ml_job(sagemaker_session):
Expand All @@ -179,7 +179,7 @@ def test_auto_ml_describe_auto_ml_job(sagemaker_session):


@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
tests.integ.test_region() != "us-east-2",
reason="AutoML is not supported in the region yet.",
)
def test_list_candidates(sagemaker_session):
Expand All @@ -194,7 +194,7 @@ def test_list_candidates(sagemaker_session):


@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
tests.integ.test_region() != "us-east-2",
reason="AutoML is not supported in the region yet.",
)
def test_best_candidate(sagemaker_session):
Expand All @@ -210,7 +210,7 @@ def test_best_candidate(sagemaker_session):


@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
tests.integ.test_region() != "us-east-2",
reason="AutoML is not supported in the region yet.",
)
def test_deploy_best_candidate(sagemaker_session):
Expand Down Expand Up @@ -238,7 +238,7 @@ def test_deploy_best_candidate(sagemaker_session):


@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
tests.integ.test_region() != "us-east-2",
reason="AutoML is not supported in the region yet.",
)
def test_candidate_estimator_default_rerun_and_deploy(sagemaker_session):
Expand Down Expand Up @@ -271,7 +271,7 @@ def test_candidate_estimator_default_rerun_and_deploy(sagemaker_session):


@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
tests.integ.test_region() != "us-east-2",
reason="AutoML is not supported in the region yet.",
)
def test_candidate_estimator_rerun_with_optional_args(sagemaker_session):
Expand Down Expand Up @@ -304,7 +304,7 @@ def test_candidate_estimator_rerun_with_optional_args(sagemaker_session):


@pytest.mark.skipif(
tests.integ.test_region() in tests.integ.NO_AUTO_ML_REGIONS,
tests.integ.test_region() != "us-east-2",
reason="AutoML is not supported in the region yet.",
)
def test_candidate_estimator_get_steps(sagemaker_session):
Expand Down