Skip to content

Commit 37af818

Browse files
milahChoiByungWook
authored andcommitted
fix: Re-enable model monitor integration tests. (#497)
1 parent 553029b commit 37af818

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

tests/integ/test_model_monitor.py

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,11 @@ def updated_output_kms_key(sagemaker_session):
267267
)
268268

269269

270-
@pytest.mark.skip
270+
@pytest.mark.skipif(
271+
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
272+
reason="ModelMonitoring is not yet supported in this region.",
273+
)
274+
@pytest.mark.canary_quick
271275
def test_default_monitor_suggest_baseline_and_create_monitoring_schedule_with_customizations(
272276
sagemaker_session, output_kms_key, volume_kms_key, predictor
273277
):
@@ -381,7 +385,10 @@ def test_default_monitor_suggest_baseline_and_create_monitoring_schedule_with_cu
381385
assert len(summary["MonitoringScheduleSummaries"]) > 0
382386

383387

384-
@pytest.mark.skip
388+
@pytest.mark.skipif(
389+
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
390+
reason="ModelMonitoring is not yet supported in this region.",
391+
)
385392
def test_default_monitor_suggest_baseline_and_create_monitoring_schedule_without_customizations(
386393
sagemaker_session, predictor
387394
):
@@ -466,7 +473,10 @@ def test_default_monitor_suggest_baseline_and_create_monitoring_schedule_without
466473
assert len(summary["MonitoringScheduleSummaries"]) > 0
467474

468475

469-
@pytest.mark.skip
476+
@pytest.mark.skipif(
477+
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
478+
reason="ModelMonitoring is not yet supported in this region.",
479+
)
470480
def test_default_monitor_create_stop_and_start_monitoring_schedule_with_customizations(
471481
sagemaker_session, output_kms_key, volume_kms_key, predictor
472482
):
@@ -543,7 +553,10 @@ def test_default_monitor_create_stop_and_start_monitoring_schedule_with_customiz
543553
_wait_for_schedule_changes_to_apply(monitor=my_default_monitor)
544554

545555

546-
@pytest.mark.skip
556+
@pytest.mark.skipif(
557+
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
558+
reason="ModelMonitoring is not yet supported in this region.",
559+
)
547560
def test_default_monitor_create_and_update_schedule_config_with_customizations(
548561
sagemaker_session,
549562
predictor,
@@ -662,7 +675,10 @@ def test_default_monitor_create_and_update_schedule_config_with_customizations(
662675
assert len(predictor.list_monitors()) > 0
663676

664677

665-
@pytest.mark.skip
678+
@pytest.mark.skipif(
679+
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
680+
reason="ModelMonitoring is not yet supported in this region.",
681+
)
666682
def test_default_monitor_create_and_update_schedule_config_without_customizations(
667683
sagemaker_session, predictor
668684
):
@@ -822,7 +838,10 @@ def test_default_monitor_monitoring_execution_interactions(
822838
assert constraint_violations.body_dict["violations"][0]["feature_name"] == "store_and_fwd_flag"
823839

824840

825-
@pytest.mark.skip
841+
@pytest.mark.skipif(
842+
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
843+
reason="ModelMonitoring is not yet supported in this region.",
844+
)
826845
def test_byoc_monitor_suggest_baseline_and_create_monitoring_schedule_with_customizations(
827846
sagemaker_session, output_kms_key, volume_kms_key, predictor
828847
):
@@ -953,7 +972,10 @@ def test_byoc_monitor_suggest_baseline_and_create_monitoring_schedule_with_custo
953972
assert len(summary["MonitoringScheduleSummaries"]) > 0
954973

955974

956-
@pytest.mark.skip
975+
@pytest.mark.skipif(
976+
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
977+
reason="ModelMonitoring is not yet supported in this region.",
978+
)
957979
def test_byoc_monitor_suggest_baseline_and_create_monitoring_schedule_without_customizations(
958980
sagemaker_session, predictor
959981
):
@@ -1066,7 +1088,10 @@ def test_byoc_monitor_suggest_baseline_and_create_monitoring_schedule_without_cu
10661088
assert len(summary["MonitoringScheduleSummaries"]) > 0
10671089

10681090

1069-
@pytest.mark.skip
1091+
@pytest.mark.skipif(
1092+
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
1093+
reason="ModelMonitoring is not yet supported in this region.",
1094+
)
10701095
def test_byoc_monitor_create_and_update_schedule_config_with_customizations(
10711096
sagemaker_session,
10721097
predictor,

0 commit comments

Comments
 (0)